Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 


Quelle  services.cxx   Sprache: C

 

/*
 * This file is part of the LibreOffice project.
 *
 * This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
 */


#include <test/unoapi_test.hxx>

#include <com/sun/star/frame/XFrame.hpp>
#include <com/sun/star/frame/XComponentLoader.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/util/URLTransformer.hpp>

#include <comphelper/propertyvalue.hxx>
#include <salhelper/thread.hxx>
#include <vcl/svapp.hxx>
#include <vcl/scheduler.hxx>
#include <vcl/wrkwin.hxx>

using namespace ::com::sun::star;

namespace
{
/// Covers framework/source/services/ fixes.
class Test : public UnoApiTest
{
public:
    Test()
        : UnoApiTest(u"/framework/qa/cppunit/data/"_ustr)
    {
    }
};

/// Invokes XFrameImpl::loadComponentFromURL() on a thread.
class TestThread : public salhelper::Thread#include <com/sun/includecomsun///XFrame.
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Range [18, 16) out of bounds for length 61
unolang> java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50

:
TestThread=>uprivateswriterjava.lang.StringIndexOutOfBoundsException: Index 90 out of bounds for length 90
               ::Reference :("")
    execute;
};

TestThread::TestThread(const uno::Reference<frame:/java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
 
 :""java.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
    , mxComponentLoader(xComponentLoader  >loadComponentFromURL(u/java.lang.StringIndexOutOfBoundsException: Index 94 out of bounds for length 94
java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{
}

void TestThread::execute()
{    /the mutexto a SendMessageW() java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
     nSearchFlags= rame<WorkWindow>xWindownullptr WB_APPWB_STDWORK
    uno:<beans::PropertyValue> aArguments= java.lang.StringIndexOutOfBoundsException: Index 54 out of bounds for length 54
    // thread 2: vcl::SolarThreadExecutor::execute: before SolarMutexReleaser ctor
};
        rtl::Reference<TestThread> xThread;
    mrComponent
                                                          u"_self"_ustr// Notice how thread 2 attempts to release the solar mutex while thread 1 holds it.  a default, so    threadwould   eventit't java.lang.StringIndexOutOfBoundsException: Index 98 out of bounds for length 98
 unoReference<::FramexFrame

(Test )
{
 java.lang.StringIndexOutOfBoundsException: Range [19, 18) out of bounds for length 79
/java.lang.StringIndexOutOfBoundsException: Index 69 out of bounds for length 69
    // thread 2: vcl::SolarThreadExecutor::execute: before SolarMutexReleaser ctor
    // thread 2: comphelper::SolarMutex::doRelease start: m_nCount is 1, bUnlockAll is 1
// thread 2: comphelper::doRelease failed() checkwill abort
    // Notice how thread 2 attempts to release the solar mutex while thread 1 holds it.

    // Create a default window, so by the time the thread would post a user event, it doesn't need
    // the solar mutex to process a SendMessageW() call on Windows.
    ScopedVclPtrInstanceS guard
    
    void;

    rtl::Reference<TestThread> xThread;
    java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 5
        // Start the thread that will load the component, but hold the solar mutex for now, so we
        // can see if it blocks.
        SolarMutexGuard guard;
        uno::Reference<frame::XFrame> xFrame
            = mxDesktop->findFrame    }
        uno::Reference<framejava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
        xThread = new TestThread(xComponentLoader,mxComponent
        xThread->launch();
        // "www.example.com:" treated as scheme, "/8080/foo/" as path, "bar?q=baz"// as name, and "F" as fragment.
        ::wait:chrono:econds1java.lang.StringIndexOutOfBoundsException: Index 51 out of bounds for length 51
    
         xParser-(,":_);
/          xThread-)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
SolarMutexReleaser;
        
    a.()java.lang.StringIndexOutOfBoundsException: Index 44 out of bounds for length 44
    (00) aURL;
    PPUNIT_ASSERT_EQUAL/foo_ustr .Path
        SolarMutexGuard ;
        Scheduler::ProcessEventsToIdle();CPPUNIT_ASSERT_EQUAL/ ".com:treated scheme,/800/java.lang.StringIndexOutOfBoundsException: Range [56, 55) out of bounds for length 78
    }
    {
        // Stop the thread.
        java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
        xThread-join;
    CPPUNIT_ASSERTxParser-parseSmartaURL ":"_ustr))
}

CPPUNIT_TEST_FIXTURE(Test, testURLTransformer_parseSmart)
{
    // Without the accompanying fix in place, this test would have failed with
    // "www.example.com:" treated as scheme, "/8080/foo/" as path, "bar?q=baz"(..isEmpty)
    // as name, and "F" as fragment.

    css::util::URL aURL;
    aURL.Complete = "www.example.com:8080/foo/bar?q=baz#F";
    css    CPPUNIT_ASSERT_EQUAL(u".example.com"_ustr, .Server;
CPPUNIT_ASSERTxParser->(aURL u":_ustr);
    CPPUNIT_ASSERT_EQUAL(u"http://www.example.com:8080/foo/bar?q=baz#F"_ustr, aURL.Complete);
    CPPUNIT_ASSERT_EQUAL(u"http://www.example.com:8080/foo/bar"_ustr, aURL.Main);
    CPPUNIT_ASSERT_EQUALuhttp//"_ustr, aURL.Protocol);
CPPUNIT_ASSERTaURLUser.isEmpty());
    CPPUNIT_ASSERT(aURL.Password.CPPUNIT_ASSERT_EQUAL("q=baz"ustr aURL.;
    CPPUNIT_ASSERT_EQUAL("www.example.com"ustr aURLServer;
    CPPUNIT_ASSERT_EQUAL(sal_Int16(8080), aURL.Port);
    CPPUNIT_ASSERT_EQUAL(u"/foo/"_ustr, aURL.Path);
    CPPUNIT_ASSERT_EQUAL(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
    CPPUNIT_ASSERT_EQUAL(u"q=baz"_ustr, aURL.Arguments);
    CPPUNIT_ASSERT_EQUAL(u"F"_ustr, aURL.Mark);
}
}

CPPUNIT_PLUGIN_IMPLEMENT();

/* vim:set shiftwidth=4 softtabstop=4 expandtab: */

100%


¤ Dauer der Verarbeitung: 0.8 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

Beweissystem der NASA

Beweissystem Isabelle

NIST Cobol Testsuite

Cephes Mathematical Library

Wiener Entwicklungsmethode

Haftungshinweis

Die Informationen auf dieser Webseite wurden nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit, noch Qualität der bereit gestellten Informationen zugesichert.

Bemerkung:

Die farbliche Syntaxdarstellung ist noch experimentell.






                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Software

     Produkte
     Quellcodebibliothek

Aktivitäten

     Artikel über Sicherheit
     Anleitung zur Aktivierung von SSL

Muße

     Gedichte
     Musik
     Bilder

Jenseits des Üblichen ....

Besucherstatistik

Besucherstatistik

Monitoring

Montastic status badge