2011-05-21 Dimitri Glazkov <dglazkov@chromium.org>
authordglazkov@chromium.org <dglazkov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Jun 2011 17:30:49 +0000 (17:30 +0000)
committerdglazkov@chromium.org <dglazkov@chromium.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 2 Jun 2011 17:30:49 +0000 (17:30 +0000)
        Reviewed by Darin Adler.

        Add build logistics and plumbing for window.internals object.
        https://bugs.webkit.org/show_bug.cgi?id=60313

        * fast/dom/Window/script-tests/window-property-descriptors.js: Added internals object to list of properties to skip.
        * fast/dom/Window/window-properties.html: Ditto.
        * fast/dom/script-tests/prototype-inheritance-2.js: Ditto.
        * fast/dom/script-tests/prototype-inheritance.js: Ditto.
        * fast/harness/internals-object-expected.txt: Added.
        * fast/harness/internals-object.html: Added.
        * platform/gtk/Skipped: Skipped the newly added test until platform supports window.internals.
        * platform/mac-wk2/Skipped: Ditto.
        * platform/qt/Skipped: Ditto.
        * platform/win/Skipped: Ditto.
2011-05-21  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by Darin Adler.

        Add build logistics and plumbing for window.internals object.
        https://bugs.webkit.org/show_bug.cgi?id=60313

        Test: fast/harness/internals-object.html

        * Configurations/WebCoreTestSupport.xcconfig: Added.
        * DerivedSources.make: Added support for generating from Internals.idl.
        * WebCore.gyp/WebCore.gyp: Added new webcore_test_support library.
        * WebCore.gypi: Ditto.
        * WebCore.xcodeproj/project.pbxproj: Added WebCoreTestSupport library.
        * testing/Internals.cpp: Added.
        * testing/Internals.h: Added.
        * testing/Internals.idl: Added.
        * testing/js/WebCoreTestSupport.cpp: Added.
        * testing/js/WebCoreTestSupport.h: Added.
        * testing/v8/WebCoreTestSupport.cpp: Added.
        * testing/v8/WebCoreTestSupport.h: Added.
2011-05-21  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by Darin Adler.

        Add build logistics and plumbing for window.internals object.
        https://bugs.webkit.org/show_bug.cgi?id=60313

        * WebKit.gyp: Added linking new webkit_test_support library.
        * public/WebTestingSupport.h: Added.
        * src/WebTestingSupport.cpp: Added.
2011-05-21  Dimitri Glazkov  <dglazkov@chromium.org>

        Reviewed by Darin Adler.

        Add build logistics and plumbing for window.internals object.
        https://bugs.webkit.org/show_bug.cgi?id=60313

        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Added linking new WebCoreTestSupport library.
        * DumpRenderTree/chromium/TestShell.cpp:
        (TestShell::bindJSObjectsToWindow): Added injection code.
        * DumpRenderTree/mac/FrameLoadDelegate.mm:
        (-[FrameLoadDelegate didClearWindowObjectInStandardWorldForFrame:]): Ditto.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@87926 268f45cc-cd09-0410-ab3c-d52691b4dbfc

36 files changed:
LayoutTests/ChangeLog
LayoutTests/fast/dom/Window/script-tests/window-property-descriptors.js
LayoutTests/fast/dom/Window/window-properties.html
LayoutTests/fast/dom/script-tests/prototype-inheritance-2.js
LayoutTests/fast/dom/script-tests/prototype-inheritance.js
LayoutTests/fast/harness/internals-object-expected.txt [new file with mode: 0644]
LayoutTests/fast/harness/internals-object.html [new file with mode: 0644]
LayoutTests/platform/gtk/Skipped
LayoutTests/platform/mac-wk2/Skipped
LayoutTests/platform/qt/Skipped
LayoutTests/platform/win/Skipped
Source/WebCore/ChangeLog
Source/WebCore/Configurations/WebCore.xcconfig
Source/WebCore/Configurations/WebCoreTestSupport.xcconfig [new file with mode: 0644]
Source/WebCore/DerivedSources.make
Source/WebCore/WebCore.exp.in
Source/WebCore/WebCore.gyp/WebCore.gyp
Source/WebCore/WebCore.gypi
Source/WebCore/WebCore.xcodeproj/project.pbxproj
Source/WebCore/bindings/js/JSDOMWrapper.cpp
Source/WebCore/bindings/js/JSDOMWrapper.h
Source/WebCore/testing/Internals.cpp [new file with mode: 0644]
Source/WebCore/testing/Internals.h [new file with mode: 0644]
Source/WebCore/testing/Internals.idl [new file with mode: 0644]
Source/WebCore/testing/js/WebCoreTestSupport.cpp [new file with mode: 0644]
Source/WebCore/testing/js/WebCoreTestSupport.h [new file with mode: 0644]
Source/WebCore/testing/v8/WebCoreTestSupport.cpp [new file with mode: 0644]
Source/WebCore/testing/v8/WebCoreTestSupport.h [new file with mode: 0644]
Source/WebKit/chromium/ChangeLog
Source/WebKit/chromium/WebKit.gyp
Source/WebKit/chromium/public/WebTestingSupport.h [new file with mode: 0644]
Source/WebKit/chromium/src/WebTestingSupport.cpp [new file with mode: 0644]
Tools/ChangeLog
Tools/DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj
Tools/DumpRenderTree/chromium/TestShell.cpp
Tools/DumpRenderTree/mac/FrameLoadDelegate.mm

index dede099..281adc8 100644 (file)
@@ -1,3 +1,21 @@
+2011-05-21  Dimitri Glazkov  <dglazkov@chromium.org>
+
+        Reviewed by Darin Adler.
+
+        Add build logistics and plumbing for window.internals object.
+        https://bugs.webkit.org/show_bug.cgi?id=60313
+
+        * fast/dom/Window/script-tests/window-property-descriptors.js: Added internals object to list of properties to skip.
+        * fast/dom/Window/window-properties.html: Ditto.
+        * fast/dom/script-tests/prototype-inheritance-2.js: Ditto.
+        * fast/dom/script-tests/prototype-inheritance.js: Ditto.
+        * fast/harness/internals-object-expected.txt: Added.
+        * fast/harness/internals-object.html: Added.
+        * platform/gtk/Skipped: Skipped the newly added test until platform supports window.internals.
+        * platform/mac-wk2/Skipped: Ditto.
+        * platform/qt/Skipped: Ditto.
+        * platform/win/Skipped: Ditto.
+
 2011-06-02  Dimitri Glazkov  <dglazkov@chromium.org>
 
         [Win] Start skipping a test that's now using shadowRoot machinery.
index 52ade3a..00605a9 100644 (file)
@@ -18,6 +18,7 @@ var __skip__ = {
     "objCPluginFunction" : 1,
     "plainText" : 1,
     "textInputController" : 1,
+    "internals" : 1,
     // Ignore these properties because they do not exist in all implementations. They will be tested separately
     "WebGLRenderingContext" : 1,
     "WebGLActiveInfo" : 1,
index 58eadf7..3f30e70 100644 (file)
@@ -60,6 +60,7 @@ var __skip__ = {
     "window.objCPluginFunction" : 1,
     "window.plainText" : 1,
     "window.textInputController" : 1,
+    "window.internals" : 1,
     // Ignore these properties because they do not exist in all implementations. They will be tested separately
     "window.WebGLRenderingContext" : 1, 
     "window.WebGLActiveInfo" : 1, 
index 462b119..b98276b 100644 (file)
@@ -12,6 +12,7 @@ var skippedProperties = [
     "objCController", "textInputController", "navigationController",
     "eventSender", "objCPlugin", "objCPluginFunction",
     "appleScriptController", "plainText", "accessibilityController",
+    "internals",
     // Skip our test property
     "isInner",
     // Ignore fooConstructor.prototype, fooInstance.__proto__ is more likely to fail.
index 47ea9be..9a5800b 100644 (file)
@@ -12,6 +12,7 @@ var skippedProperties = [
     "objCController", "textInputController", "navigationController",
     "eventSender", "objCPlugin", "objCPluginFunction",
     "appleScriptController", "plainText", "accessibilityController",
+    "internals",
     // Ignore these properties because they do not exist in all implementations. They will be tested separately
     "webkitNotifications",
     "webkitAudioPannerNode",
diff --git a/LayoutTests/fast/harness/internals-object-expected.txt b/LayoutTests/fast/harness/internals-object-expected.txt
new file mode 100644 (file)
index 0000000..ed9aaaf
--- /dev/null
@@ -0,0 +1 @@
+window.internals object should be visible when running in DRT: PASS
diff --git a/LayoutTests/fast/harness/internals-object.html b/LayoutTests/fast/harness/internals-object.html
new file mode 100644 (file)
index 0000000..2bee7bf
--- /dev/null
@@ -0,0 +1,23 @@
+<html>
+<head>
+<script>
+
+if (layoutTestController)
+    layoutTestController.dumpAsText();
+
+function runTest()
+{
+    var log = document.body.appendChild(document.createElement('div'));
+    log.write = function(msg, success)
+    {
+        this.appendChild(document.createElement('div')).textContent = msg + ': ' + (success ? 'PASS' : 'FAIL');
+    }
+
+    log.write('window.internals object should be visible when running in DRT', !!window.internals);
+}
+
+</script>
+</head>
+<body onload="runTest()">
+</body>
+</html>
\ No newline at end of file
index 3ac8bde..c1337bd 100644 (file)
@@ -1531,3 +1531,5 @@ http/tests/eventsource/workers/eventsource-simple.html
 # failing dropzone test(http://bugs.webkit.org/show_bug.cgi?id=61630)
 fast/events/dropzone-002.html
 
+# https://bugs.webkit.org/show_bug.cgi?id=61071
+fast/harness/internals-object.html
index 708d4c5..e84ac48 100644 (file)
@@ -1517,6 +1517,9 @@ plugins/private-browsing-mode-2.html
 # http://webkit.org/b/58990
 editing/undo/undo-iframe-location-change.html
 
+# https://bugs.webkit.org/show_bug.cgi?id=61073
+fast/harness/internals-object.html
+
 ### END OF (1) Classified failures with bug reports
 ########################################
 
index f6c9e94..efee199 100644 (file)
@@ -2527,3 +2527,6 @@ fast/html/set-text-direction.html
 
 # JSC does not support setIsolatedWorldSecurityOrigin (http://webkit.org/b/61540)
 http/tests/security/isolatedWorld/cross-origin-xhr.html
+
+# https://bugs.webkit.org/show_bug.cgi?id=61074
+fast/harness/internals-object.html
index 1d722ca..85ee5cd 100644 (file)
@@ -1318,3 +1318,6 @@ loader/navigation-while-deferring-loads.html
 
 # JSC does not support setIsolatedWorldSecurityOrigin (http://webkit.org/b/61540)
 http/tests/security/isolatedWorld/cross-origin-xhr.html
+
+# https://bugs.webkit.org/show_bug.cgi?id=61076
+fast/harness/internals-object.html
index d4033a1..48e33a2 100644 (file)
@@ -1,3 +1,25 @@
+2011-05-21  Dimitri Glazkov  <dglazkov@chromium.org>
+
+        Reviewed by Darin Adler.
+
+        Add build logistics and plumbing for window.internals object.
+        https://bugs.webkit.org/show_bug.cgi?id=60313
+
+        Test: fast/harness/internals-object.html
+
+        * Configurations/WebCoreTestSupport.xcconfig: Added.
+        * DerivedSources.make: Added support for generating from Internals.idl.
+        * WebCore.gyp/WebCore.gyp: Added new webcore_test_support library.
+        * WebCore.gypi: Ditto.
+        * WebCore.xcodeproj/project.pbxproj: Added WebCoreTestSupport library.
+        * testing/Internals.cpp: Added.
+        * testing/Internals.h: Added.
+        * testing/Internals.idl: Added.
+        * testing/js/WebCoreTestSupport.cpp: Added.
+        * testing/js/WebCoreTestSupport.h: Added.
+        * testing/v8/WebCoreTestSupport.cpp: Added.
+        * testing/v8/WebCoreTestSupport.h: Added.
+
 2011-06-02  Naoki Takano  <takano.naoki@gmail.com>
 
         Reviewed by Dimitri Glazkov.
index 3ba7319..8839ade 100644 (file)
@@ -50,7 +50,7 @@ INSTALL_PATH_macosx = $(SYSTEM_LIBRARY_DIR)/Frameworks/WebKit.framework/Versions
 INSTALLHDRS_COPY_PHASE = YES;
 INSTALLHDRS_SCRIPT_PHASE = YES;
 PRODUCT_NAME = WebCore;
-OTHER_LDFLAGS_BASE = -l$(SQLITE3_LIBRARY) -lobjc -lANGLE;
+OTHER_LDFLAGS_BASE = -l$(SQLITE3_LIBRARY) -lobjc -lANGLE -allowable_client WebCoreTestSupport;
 OTHER_LDFLAGS = $(OTHER_LDFLAGS_$(REAL_PLATFORM_NAME));
 OTHER_LDFLAGS_iphoneos = $(OTHER_LDFLAGS_BASE) -framework CFNetwork -framework CoreFoundation -framework CoreGraphics -framework CoreText -framework Foundation -framework GraphicsServices -framework ImageIO -framework QuartzCore;
 OTHER_LDFLAGS_iphonesimulator = $(OTHER_LDFLAGS_iphoneos);
diff --git a/Source/WebCore/Configurations/WebCoreTestSupport.xcconfig b/Source/WebCore/Configurations/WebCoreTestSupport.xcconfig
new file mode 100644 (file)
index 0000000..7a40779
--- /dev/null
@@ -0,0 +1,30 @@
+// Copyright (C) 2011 Google Inc. All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions
+// are met:
+// 1. Redistributions of source code must retain the above copyright
+//    notice, this list of conditions and the following disclaimer.
+// 2. Redistributions in binary form must reproduce the above copyright
+//    notice, this list of conditions and the following disclaimer in the
+//    documentation and/or other materials provided with the distribution.
+//
+// THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+// EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+// PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL APPLE INC. OR
+// CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+// EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+// PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+// PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+// OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 
+
+#include "WebCore.xcconfig"
+
+PRIVATE_HEADERS_FOLDER_PATH = WebCoreTestSupport;
+PRODUCT_NAME = WebCoreTestSupport;
+OTHER_LDFLAGS = ;
+EXPORTED_SYMBOLS_FILE = ;
+INSTALL_PATH = $(BUILT_PRODUCTS_DIR);
index 864ede6..ab5d296 100644 (file)
@@ -46,6 +46,7 @@ VPATH = \
     $(WebCore)/webaudio \
     $(WebCore)/workers \
     $(WebCore)/svg \
+    $(WebCore)/testing \
     $(WebCore)/websockets \
 #
 
@@ -291,6 +292,7 @@ DOM_CLASSES = \
     ImageData \
     InjectedScriptHost \
     InspectorFrontendHost \
+    Internals \
     KeyboardEvent \
     Location \
     MediaError \
index f830437..32f9a27 100644 (file)
@@ -263,6 +263,7 @@ __ZN7WebCore12IconDatabase27checkIntegrityBeforeOpeningEv
 __ZN7WebCore12IconDatabase5closeEv
 __ZN7WebCore12IconDatabase9setClientEPNS_18IconDatabaseClientE
 __ZN7WebCore12IconDatabaseC1Ev
+__ZN7WebCore12JSDOMWrapper34virtualFunctionToPreventWeakVtableEv
 __ZN7WebCore12PopupMenuMacC1EPNS_15PopupMenuClientE
 __ZN7WebCore12PrintContext12pagePropertyEPNS_5FrameEPKci
 __ZN7WebCore12PrintContext13numberOfPagesEPNS_5FrameERKNS_9FloatSizeE
@@ -1016,6 +1017,8 @@ __ZN7WebCore9makeRangeERKNS_15VisiblePositionES2_
 __ZN7WebCore9pageCacheEv
 __ZN7WebCore9plainTextEPKNS_5RangeENS_20TextIteratorBehaviorE
 __ZN7WebCore9toElementEN3JSC7JSValueE
+__ZN7WebCore17cacheDOMStructureEPNS_17JSDOMGlobalObjectEPN3JSC9StructureEPKNS2_9ClassInfoE
+__ZN7WebCore21getCachedDOMStructureEPNS_17JSDOMGlobalObjectEPKN3JSC9ClassInfoE
 __ZNK3JSC8Bindings10RootObject12globalObjectEv
 __ZNK3WTF6String14createCFStringEv
 __ZNK7WebCore5Frame26getDocumentBackgroundColorEv
@@ -1311,6 +1314,7 @@ __ZNK7WebCore9FrameView28isEnclosedInCompositingLayerEv
 __ZNK7WebCore9PageCache10frameCountEv
 __ZNK7WebCore9PageCache21autoreleasedPageCountEv
 __ZTVN7WebCore12ChromeClientE
+__ZTVN7WebCore12JSDOMWrapperE
 __ZTVN7WebCore16IconDatabaseBaseE
 __ZTVN7WebCore17FileChooserClientE
 __ZTVN7WebCore17FrameLoaderClientE
@@ -1644,8 +1648,6 @@ __ZN3JSC8Bindings8InstanceC2EN3WTF10PassRefPtrINS0_10RootObjectEEE
 __ZN3JSC8Bindings8InstanceD2Ev
 __ZN7WebCore13IdentifierRep7isValidEPS0_
 __ZN7WebCore16ScriptController16createRootObjectEPv
-__ZN7WebCore17cacheDOMStructureEPNS_17JSDOMGlobalObjectEPN3JSC9StructureEPKNS2_9ClassInfoE
-__ZN7WebCore21getCachedDOMStructureEPNS_17JSDOMGlobalObjectEPKN3JSC9ClassInfoE
 __ZNK3JSC8Bindings13RuntimeObject12defaultValueEPNS_9ExecStateENS_22PreferredPrimitiveTypeE
 __ZTVN3JSC13RuntimeMethodE
 #endif
index 013f044..1ea2334 100644 (file)
 
         # idl rules
         '<@(bindings_idl_files)',
+        '<@(webcore_test_support_idl_files)',
       ],
       'actions': [
         # Actions to build derived sources.
               '--include', '../plugins',
               '--include', '../storage',
               '--include', '../svg',
+              '--include', '../testing',
               '--include', '../webaudio',
               '--include', '../websockets',
               '--include', '../workers',
         }],
       ],
     },
+    {
+      'target_name': 'webcore_test_support',
+      'type': 'static_library',
+      'dependencies': [
+        'webcore',
+      ],
+      'include_dirs': [
+        '<(INTERMEDIATE_DIR)',
+        '<(SHARED_INTERMEDIATE_DIR)/webcore',
+        '<(SHARED_INTERMEDIATE_DIR)/webkit',
+        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings',
+        '<@(webcore_include_dirs)',
+        '../testing',
+        '../testing/v8',
+      ],
+      'sources': [
+        '<@(webcore_test_support_files)',
+        '<(SHARED_INTERMEDIATE_DIR)/webcore/bindings/V8Internals.cpp',
+        '<(SHARED_INTERMEDIATE_DIR)/webkit/bindings/V8Internals.h',
+      ],
+      'sources/': [
+        ['exclude', 'testing/js'],
+      ],
+    },
   ],  # targets
 }
index 1003b9a..b7f3e40 100644 (file)
             'xml/XSLTUnicodeSort.cpp',
             'xml/XSLTUnicodeSort.h',
         ],
+        'webcore_test_support_idl_files': [
+          'testing/Internals.idl',
+        ],
+        'webcore_test_support_files': [
+            'testing/v8/WebCoreTestSupport.cpp',
+            'testing/v8/WebCoreTestSupport.h',
+            'testing/js/WebCoreTestSupport.cpp',
+            'testing/js/WebCoreTestSupport.h',
+            'testing/Internals.cpp',
+            'testing/Internals.h',
+        ],
         'webcore_resource_files': [
             'English.lproj/Localizable.strings',
             'English.lproj/localizedStrings.js',
index b06f6dc..998b2d3 100644 (file)
@@ -7,6 +7,18 @@
        objects = {
 
 /* Begin PBXAggregateTarget section */
+               41816F7913859C550057AAA4 /* All */ = {
+                       isa = PBXAggregateTarget;
+                       buildConfigurationList = 41816F8113859C640057AAA4 /* Build configuration list for PBXAggregateTarget "All" */;
+                       buildPhases = (
+                       );
+                       dependencies = (
+                               41816F8313859C7A0057AAA4 /* PBXTargetDependency */,
+                               41816F8513859C7D0057AAA4 /* PBXTargetDependency */,
+                       );
+                       name = All;
+                       productName = All;
+               };
                5D87BB6411E3EBC100702B6F /* WebCoreExportFileGenerator Generator */ = {
                        isa = PBXAggregateTarget;
                        buildConfigurationList = 5D87BB6C11E3EC0000702B6F /* Build configuration list for PBXAggregateTarget "WebCoreExportFileGenerator Generator" */;
                410B7E721045FAB000D8224F /* JSMessageEventCustom.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 410B7E711045FAB000D8224F /* JSMessageEventCustom.cpp */; };
                411046410FA222A600BA436A /* ScriptEventListener.h in Headers */ = {isa = PBXBuildFile; fileRef = 4110463F0FA222A600BA436A /* ScriptEventListener.h */; };
                411046420FA222A600BA436A /* ScriptEventListener.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 411046400FA222A600BA436A /* ScriptEventListener.cpp */; };
+               4123081B138C429700BCCFCA /* WebCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 93F19B1A08245E5A001E9ABC /* WebCore.framework */; };
+               41230913138C42FF00BCCFCA /* JavaScriptCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F8216299029F4FB501000131 /* JavaScriptCore.framework */; };
                4123E569127B3041000FEEA7 /* WindowEventContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 4123E567127B3041000FEEA7 /* WindowEventContext.h */; };
                4123E56A127B3041000FEEA7 /* WindowEventContext.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4123E568127B3041000FEEA7 /* WindowEventContext.cpp */; };
                4127D5370F8AAB1D00E424F5 /* ScriptState.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4127D5360F8AAB1D00E424F5 /* ScriptState.cpp */; };
                416E75CC0EDF90C700360E1D /* ScriptCallFrame.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 416E75CA0EDF90C700360E1D /* ScriptCallFrame.cpp */; };
                417253AA1354BBBC00360F2A /* MediaControlElements.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 417253A81354BBBC00360F2A /* MediaControlElements.cpp */; };
                417253AB1354BBBC00360F2A /* MediaControlElements.h in Headers */ = {isa = PBXBuildFile; fileRef = 417253A91354BBBC00360F2A /* MediaControlElements.h */; };
+               417DA6D913734E6E007C57FB /* Internals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 417DA4CF13734326007C57FB /* Internals.cpp */; };
+               417DA6DA13734E6E007C57FB /* Internals.h in Headers */ = {isa = PBXBuildFile; fileRef = 417DA4CE13734326007C57FB /* Internals.h */; };
+               417DA71D13735DFA007C57FB /* JSInternals.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 417DA71B13735DFA007C57FB /* JSInternals.cpp */; };
+               417DA71E13735DFA007C57FB /* JSInternals.h in Headers */ = {isa = PBXBuildFile; fileRef = 417DA71C13735DFA007C57FB /* JSInternals.h */; };
+               41815C1E138319830057AAA4 /* WebCoreTestSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41815C1C138319830057AAA4 /* WebCoreTestSupport.cpp */; };
+               41815C1F138319830057AAA4 /* WebCoreTestSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 41815C1D138319830057AAA4 /* WebCoreTestSupport.h */; settings = {ATTRIBUTES = (Private, ); }; };
                41885B9311B6FDA6003383BB /* FormSubmission.h in Headers */ = {isa = PBXBuildFile; fileRef = 41885B9111B6FDA6003383BB /* FormSubmission.h */; settings = {ATTRIBUTES = (Private, ); }; };
                41885B9411B6FDA6003383BB /* FormSubmission.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 41885B9211B6FDA6003383BB /* FormSubmission.cpp */; };
                418A06D0133C04D500CD379C /* EventDispatcher.h in Headers */ = {isa = PBXBuildFile; fileRef = 418A06CE133C04D500CD379C /* EventDispatcher.h */; };
 /* End PBXBuildFile section */
 
 /* Begin PBXContainerItemProxy section */
+               417DA6D413734E0D007C57FB /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = 93F198A508245E59001E9ABC;
+                       remoteInfo = WebCore;
+               };
+               41816F8213859C7A0057AAA4 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = 93F198A508245E59001E9ABC;
+                       remoteInfo = WebCore;
+               };
+               41816F8413859C7D0057AAA4 /* PBXContainerItemProxy */ = {
+                       isa = PBXContainerItemProxy;
+                       containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
+                       proxyType = 1;
+                       remoteGlobalIDString = 417DA6CF13734E02007C57FB;
+                       remoteInfo = WebCoreTestSupport;
+               };
                5D87BB6A11E3EBD200702B6F /* PBXContainerItemProxy */ = {
                        isa = PBXContainerItemProxy;
                        containerPortal = 0867D690FE84028FC02AAC07 /* Project object */;
                416E75CA0EDF90C700360E1D /* ScriptCallFrame.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptCallFrame.cpp; sourceTree = "<group>"; };
                417253A81354BBBC00360F2A /* MediaControlElements.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = MediaControlElements.cpp; sourceTree = "<group>"; };
                417253A91354BBBC00360F2A /* MediaControlElements.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MediaControlElements.h; sourceTree = "<group>"; };
+               417DA4CE13734326007C57FB /* Internals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Internals.h; sourceTree = "<group>"; };
+               417DA4CF13734326007C57FB /* Internals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Internals.cpp; sourceTree = "<group>"; };
+               417DA6D013734E02007C57FB /* WebCoreTestSupport.dylib */ = {isa = PBXFileReference; explicitFileType = "compiled.mach-o.dylib"; includeInIndex = 0; path = WebCoreTestSupport.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+               417DA71B13735DFA007C57FB /* JSInternals.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSInternals.cpp; sourceTree = "<group>"; };
+               417DA71C13735DFA007C57FB /* JSInternals.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSInternals.h; sourceTree = "<group>"; };
+               41813F9113818AD60057AAA4 /* Internals.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = Internals.idl; sourceTree = "<group>"; };
+               41815C1C138319830057AAA4 /* WebCoreTestSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebCoreTestSupport.cpp; sourceTree = "<group>"; };
+               41815C1D138319830057AAA4 /* WebCoreTestSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebCoreTestSupport.h; sourceTree = "<group>"; };
+               4181707D1386EDF20057AAA4 /* WebCoreTestSupport.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; path = WebCoreTestSupport.xcconfig; sourceTree = "<group>"; };
                41885B9111B6FDA6003383BB /* FormSubmission.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FormSubmission.h; sourceTree = "<group>"; };
                41885B9211B6FDA6003383BB /* FormSubmission.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FormSubmission.cpp; sourceTree = "<group>"; };
                418A06CE133C04D500CD379C /* EventDispatcher.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = EventDispatcher.h; sourceTree = "<group>"; };
 /* End PBXFileReference section */
 
 /* Begin PBXFrameworksBuildPhase section */
+               417DA6CE13734E02007C57FB /* Frameworks */ = {
+                       isa = PBXFrameworksBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               41230913138C42FF00BCCFCA /* JavaScriptCore.framework in Frameworks */,
+                               4123081B138C429700BCCFCA /* WebCore.framework in Frameworks */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                5D87BB4D11E3EAEB00702B6F /* Frameworks */ = {
                        isa = PBXFrameworksBuildPhase;
                        buildActionMask = 2147483647;
                        isa = PBXGroup;
                        children = (
                                5D87BB4F11E3EAEB00702B6F /* WebCoreExportFileGenerator */,
+                               417DA6D013734E02007C57FB /* WebCoreTestSupport.dylib */,
                                93F19B1A08245E5A001E9ABC /* WebCore.framework */,
                        );
                        name = Products;
                                F523D2F302DE443B018635CA /* rendering */,
                                1AE82EC90CAAE177002237AE /* storage */,
                                B22277CA0D00BF1E0071B782 /* svg */,
+                               417DA4CD13734204007C57FB /* testing */,
                                FD315FA212B025B100C1A359 /* webaudio */,
                                518A34BD1026C831001B6896 /* websockets */,
                                2E4346310F546A6800B0F1BA /* workers */,
                                BC9854460CD3DA5F00069BC1 /* Ranges */,
                                A83B79150CCB0078000B0825 /* Storage */,
                                A83B790A0CCAFF47000B0825 /* SVG */,
+                               417DA71213735D90007C57FB /* Testing */,
                                E1C8BE4B0E8BD0D10064CB7D /* Threads */,
                                BC9854530CD3DA8F00069BC1 /* Traversal */,
                                FDA15E7B12B03E04003A583A /* WebAudio */,
                                449098B10F8F82520076A327 /* FeatureDefines.xcconfig */,
                                1C904DF90BA9D2C80081E9D0 /* Version.xcconfig */,
                                1CDD45E50BA9C84600F90147 /* WebCore.xcconfig */,
+                               4181707D1386EDF20057AAA4 /* WebCoreTestSupport.xcconfig */,
                        );
                        path = Configurations;
                        sourceTree = "<group>";
                        path = shadow;
                        sourceTree = "<group>";
                };
+               417DA4CD13734204007C57FB /* testing */ = {
+                       isa = PBXGroup;
+                       children = (
+                               41815C1B138319630057AAA4 /* js */,
+                               417DA4CF13734326007C57FB /* Internals.cpp */,
+                               417DA4CE13734326007C57FB /* Internals.h */,
+                               41813F9113818AD60057AAA4 /* Internals.idl */,
+                       );
+                       path = testing;
+                       sourceTree = "<group>";
+               };
+               417DA71213735D90007C57FB /* Testing */ = {
+                       isa = PBXGroup;
+                       children = (
+                               417DA71B13735DFA007C57FB /* JSInternals.cpp */,
+                               417DA71C13735DFA007C57FB /* JSInternals.h */,
+                       );
+                       name = Testing;
+                       sourceTree = "<group>";
+               };
+               41815C1B138319630057AAA4 /* js */ = {
+                       isa = PBXGroup;
+                       children = (
+                               41815C1C138319830057AAA4 /* WebCoreTestSupport.cpp */,
+                               41815C1D138319830057AAA4 /* WebCoreTestSupport.h */,
+                       );
+                       path = js;
+                       sourceTree = "<group>";
+               };
                439046C212DA25CE00AF80A2 /* mathml */ = {
                        isa = PBXGroup;
                        children = (
 /* End PBXGroup section */
 
 /* Begin PBXHeadersBuildPhase section */
+               417DA6CC13734E02007C57FB /* Headers */ = {
+                       isa = PBXHeadersBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               417DA6DA13734E6E007C57FB /* Internals.h in Headers */,
+                               417DA71E13735DFA007C57FB /* JSInternals.h in Headers */,
+                               41815C1F138319830057AAA4 /* WebCoreTestSupport.h in Headers */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                93F198A608245E59001E9ABC /* Headers */ = {
                        isa = PBXHeadersBuildPhase;
                        buildActionMask = 2147483647;
 /* End PBXHeadersBuildPhase section */
 
 /* Begin PBXNativeTarget section */
+               417DA6CF13734E02007C57FB /* WebCoreTestSupport */ = {
+                       isa = PBXNativeTarget;
+                       buildConfigurationList = 417DA6D813734E47007C57FB /* Build configuration list for PBXNativeTarget "WebCoreTestSupport" */;
+                       buildPhases = (
+                               417DA6CC13734E02007C57FB /* Headers */,
+                               417DA6CD13734E02007C57FB /* Sources */,
+                               417DA6CE13734E02007C57FB /* Frameworks */,
+                       );
+                       buildRules = (
+                       );
+                       dependencies = (
+                               417DA6D513734E0D007C57FB /* PBXTargetDependency */,
+                       );
+                       name = WebCoreTestSupport;
+                       productName = WebCoreTestSupport;
+                       productReference = 417DA6D013734E02007C57FB /* WebCoreTestSupport.dylib */;
+                       productType = "com.apple.product-type.library.dynamic";
+               };
                5D87BB4E11E3EAEB00702B6F /* WebCoreExportFileGenerator */ = {
                        isa = PBXNativeTarget;
                        buildConfigurationList = 5D87BB5911E3EB0700702B6F /* Build configuration list for PBXNativeTarget "WebCoreExportFileGenerator" */;
                        projectDirPath = "";
                        projectRoot = "";
                        targets = (
+                               41816F7913859C550057AAA4 /* All */,
                                93F198A508245E59001E9ABC /* WebCore */,
                                DD041FBE09D9DDBE0010AF2A /* Derived Sources */,
                                5D87BB4E11E3EAEB00702B6F /* WebCoreExportFileGenerator */,
                                5D87BB6411E3EBC100702B6F /* WebCoreExportFileGenerator Generator */,
+                               417DA6CF13734E02007C57FB /* WebCoreTestSupport */,
                        );
                };
 /* End PBXProject section */
 /* End PBXShellScriptBuildPhase section */
 
 /* Begin PBXSourcesBuildPhase section */
+               417DA6CD13734E02007C57FB /* Sources */ = {
+                       isa = PBXSourcesBuildPhase;
+                       buildActionMask = 2147483647;
+                       files = (
+                               417DA6D913734E6E007C57FB /* Internals.cpp in Sources */,
+                               417DA71D13735DFA007C57FB /* JSInternals.cpp in Sources */,
+                               41815C1E138319830057AAA4 /* WebCoreTestSupport.cpp in Sources */,
+                       );
+                       runOnlyForDeploymentPostprocessing = 0;
+               };
                5D87BB4C11E3EAEB00702B6F /* Sources */ = {
                        isa = PBXSourcesBuildPhase;
                        buildActionMask = 2147483647;
 /* End PBXSourcesBuildPhase section */
 
 /* Begin PBXTargetDependency section */
+               417DA6D513734E0D007C57FB /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = 93F198A508245E59001E9ABC /* WebCore */;
+                       targetProxy = 417DA6D413734E0D007C57FB /* PBXContainerItemProxy */;
+               };
+               41816F8313859C7A0057AAA4 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = 93F198A508245E59001E9ABC /* WebCore */;
+                       targetProxy = 41816F8213859C7A0057AAA4 /* PBXContainerItemProxy */;
+               };
+               41816F8513859C7D0057AAA4 /* PBXTargetDependency */ = {
+                       isa = PBXTargetDependency;
+                       target = 417DA6CF13734E02007C57FB /* WebCoreTestSupport */;
+                       targetProxy = 41816F8413859C7D0057AAA4 /* PBXContainerItemProxy */;
+               };
                5D87BB6B11E3EBD200702B6F /* PBXTargetDependency */ = {
                        isa = PBXTargetDependency;
                        target = 5D87BB6411E3EBC100702B6F /* WebCoreExportFileGenerator Generator */;
                        };
                        name = Production;
                };
+               417DA6D113734E02007C57FB /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       baseConfigurationReference = 4181707D1386EDF20057AAA4 /* WebCoreTestSupport.xcconfig */;
+                       buildSettings = {
+                       };
+                       name = Debug;
+               };
+               417DA6D213734E02007C57FB /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       baseConfigurationReference = 4181707D1386EDF20057AAA4 /* WebCoreTestSupport.xcconfig */;
+                       buildSettings = {
+                       };
+                       name = Release;
+               };
+               417DA6D313734E02007C57FB /* Production */ = {
+                       isa = XCBuildConfiguration;
+                       baseConfigurationReference = 4181707D1386EDF20057AAA4 /* WebCoreTestSupport.xcconfig */;
+                       buildSettings = {
+                       };
+                       name = Production;
+               };
+               41816F7A13859C560057AAA4 /* Debug */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               PRODUCT_NAME = All;
+                       };
+                       name = Debug;
+               };
+               41816F7B13859C560057AAA4 /* Release */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               PRODUCT_NAME = All;
+                       };
+                       name = Release;
+               };
+               41816F7C13859C560057AAA4 /* Production */ = {
+                       isa = XCBuildConfiguration;
+                       buildSettings = {
+                               PRODUCT_NAME = All;
+                       };
+                       name = Production;
+               };
                5D87BB5111E3EAEB00702B6F /* Debug */ = {
                        isa = XCBuildConfiguration;
                        baseConfigurationReference = 1CDD45E50BA9C84600F90147 /* WebCore.xcconfig */;
                        defaultConfigurationIsVisible = 0;
                        defaultConfigurationName = Production;
                };
+               417DA6D813734E47007C57FB /* Build configuration list for PBXNativeTarget "WebCoreTestSupport" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               417DA6D113734E02007C57FB /* Debug */,
+                               417DA6D213734E02007C57FB /* Release */,
+                               417DA6D313734E02007C57FB /* Production */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Production;
+               };
+               41816F8113859C640057AAA4 /* Build configuration list for PBXAggregateTarget "All" */ = {
+                       isa = XCConfigurationList;
+                       buildConfigurations = (
+                               41816F7A13859C560057AAA4 /* Debug */,
+                               41816F7B13859C560057AAA4 /* Release */,
+                               41816F7C13859C560057AAA4 /* Production */,
+                       );
+                       defaultConfigurationIsVisible = 0;
+                       defaultConfigurationName = Production;
+               };
                5D87BB5911E3EB0700702B6F /* Build configuration list for PBXNativeTarget "WebCoreExportFileGenerator" */ = {
                        isa = XCConfigurationList;
                        buildConfigurations = (
index 60c0ed1..d54fe74 100644 (file)
@@ -32,12 +32,9 @@ using namespace JSC;
 
 namespace WebCore {
 
-#ifndef NDEBUG
-
-JSDOMWrapper::~JSDOMWrapper()
+void JSDOMWrapper::virtualFunctionToPreventWeakVtable()
 {
+    ASSERT_NOT_REACHED();
 }
 
-#endif
-
 } // namespace WebCore
index 2f5bebd..9a4aca5 100644 (file)
@@ -48,6 +48,10 @@ public:
     }
 
 protected:
+    // An inline function cannot be the first non-abstract virtual function declared
+    // in the class as it results in the vtable being generated as a weak symbol.
+    virtual void virtualFunctionToPreventWeakVtable();
+
     explicit JSDOMWrapper(JSC::Structure* structure, JSC::JSGlobalObject* globalObject) 
         : JSObjectWithGlobalObject(globalObject, structure)
     {
@@ -56,10 +60,6 @@ protected:
         // needing to reach through the frame to get to the Document*.  See bug 27640.
         // ASSERT(globalObject->scriptExecutionContext());
     }
-
-#ifndef NDEBUG
-    virtual ~JSDOMWrapper();
-#endif
 };
 
 } // namespace WebCore
diff --git a/Source/WebCore/testing/Internals.cpp b/Source/WebCore/testing/Internals.cpp
new file mode 100644 (file)
index 0000000..c58913e
--- /dev/null
@@ -0,0 +1,44 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "Internals.h"
+
+namespace WebCore {
+
+PassRefPtr<Internals> Internals::create()
+{
+    return adoptRef(new Internals);
+}
+
+Internals::~Internals()
+{
+}
+
+Internals::Internals()
+{
+}
+
+}
diff --git a/Source/WebCore/testing/Internals.h b/Source/WebCore/testing/Internals.h
new file mode 100644 (file)
index 0000000..cbbd9b9
--- /dev/null
@@ -0,0 +1,45 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef Internals_h
+#define Internals_h
+
+#include <wtf/PassRefPtr.h>
+#include <wtf/RefCounted.h>
+
+namespace WebCore {
+
+class Internals : public RefCounted<Internals> {
+public:
+    static PassRefPtr<Internals> create();
+    virtual ~Internals();
+
+private:
+    Internals();
+};
+
+} // namespace WebCore
+
+#endif
diff --git a/Source/WebCore/testing/Internals.idl b/Source/WebCore/testing/Internals.idl
new file mode 100644 (file)
index 0000000..d5011ce
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+module window {
+    interface [OmitConstructor] Internals {
+    };
+}
\ No newline at end of file
diff --git a/Source/WebCore/testing/js/WebCoreTestSupport.cpp b/Source/WebCore/testing/js/WebCoreTestSupport.cpp
new file mode 100644 (file)
index 0000000..bbc83b7
--- /dev/null
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebCoreTestSupport.h"
+
+#include "Internals.h"
+#include "JSDOMGlobalObject.h"
+#include "JSInternals.h"
+#include <JavaScriptCore/APICast.h>
+#include <interpreter/CallFrame.h>
+
+using namespace JSC;
+using namespace WebCore;
+
+namespace WebCoreTestSupport {
+
+void injectInternalsObject(JSContextRef context)
+{
+    JSLock lock(SilenceAssertionsOnly);
+    ExecState* exec = toJS(context);
+    JSDOMGlobalObject* globalObject = static_cast<JSDOMGlobalObject*>(exec->lexicalGlobalObject());
+    globalObject->putDirect(exec->globalData(), Identifier(exec, "internals"), toJS(exec, globalObject, Internals::create()));
+}
+
+}
diff --git a/Source/WebCore/testing/js/WebCoreTestSupport.h b/Source/WebCore/testing/js/WebCoreTestSupport.h
new file mode 100644 (file)
index 0000000..66d7ed4
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebCoreTestSupport_h
+#define WebCoreTestSupport_h
+
+typedef const struct OpaqueJSContext* JSContextRef;
+
+namespace WebCoreTestSupport {
+
+void injectInternalsObject(JSContextRef);
+
+} // namespace WebCore
+
+#endif
diff --git a/Source/WebCore/testing/v8/WebCoreTestSupport.cpp b/Source/WebCore/testing/v8/WebCoreTestSupport.cpp
new file mode 100644 (file)
index 0000000..9af9375
--- /dev/null
@@ -0,0 +1,46 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "WebCoreTestSupport.h"
+
+#include "Internals.h"
+#include "V8Internals.h"
+
+#include <v8.h>
+
+using namespace WebCore;
+
+namespace WebCoreTestSupport {
+
+void injectInternalsObject(v8::Local<v8::Context> context)
+{
+    v8::Context::Scope contextScope(context);
+    v8::HandleScope scope;
+
+    context->Global()->Set(v8::String::New("internals"), toV8(Internals::create()));
+}
+
+}
diff --git a/Source/WebCore/testing/v8/WebCoreTestSupport.h b/Source/WebCore/testing/v8/WebCoreTestSupport.h
new file mode 100644 (file)
index 0000000..9e3d587
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebCoreTestSupport_h
+#define WebCoreTestSupport_h
+
+namespace v8 {
+class Context;
+template <class T> class Local;
+}
+
+namespace WebCoreTestSupport {
+
+void injectInternalsObject(v8::Local<v8::Context>);
+
+} // namespace WebCore
+
+#endif
index 3b09115..aa2bb89 100644 (file)
@@ -1,3 +1,14 @@
+2011-05-21  Dimitri Glazkov  <dglazkov@chromium.org>
+
+        Reviewed by Darin Adler.
+
+        Add build logistics and plumbing for window.internals object.
+        https://bugs.webkit.org/show_bug.cgi?id=60313
+
+        * WebKit.gyp: Added linking new webkit_test_support library.
+        * public/WebTestingSupport.h: Added.
+        * src/WebTestingSupport.cpp: Added.
+
 2011-06-02  Naoki Takano  <takano.naoki@gmail.com>
 
         Reviewed by Dimitri Glazkov.
index bf8e6c7..a35146a 100644 (file)
                             ],
                             'dependencies': [
                                 '../../WebCore/WebCore.gyp/WebCore.gyp:webcore_bindings',
+                                '../../WebCore/WebCore.gyp/WebCore.gyp:webcore_test_support',
                                 '<(chromium_src_dir)/base/base.gyp:test_support_base',
                                 '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
                                 '<(chromium_src_dir)/testing/gtest.gyp:gtest',
                                 '<(chromium_src_dir)/build/temp_gyp/googleurl.gyp:googleurl',
                                 '<(chromium_src_dir)/v8/tools/gyp/v8.gyp:v8',
                             ],
+                            'include_dirs': [
+                                # WARNING: Do not view this particular case as a precedent for
+                                # including WebCore headers in DumpRenderTree project.
+                                '../../WebCore/testing/v8', # for WebCoreTestSupport.h, needed to link in window.internals code.
+                            ],
                             'sources': [
                                 '<@(webkit_unittest_files)',
+                                'src/WebTestingSupport.cpp',
+                                'public/WebTestingSupport.h',
                                 'tests/WebUnitTests.cpp',   # Components test runner support.
                             ],
                             'sources!': [
                         '<(chromium_src_dir)/webkit/support/setup_third_party.gyp:third_party_headers',
                     ]
                 }],
+                ['component!="shared_library"', {
+                    'dependencies': [
+                        '../../WebCore/WebCore.gyp/WebCore.gyp:webcore_test_support',
+                    ],
+                    'include_dirs': [
+                        # WARNING: Do not view this particular case as a precedent for
+                        # including WebCore headers in DumpRenderTree project.
+                        '../../WebCore/testing/v8', # for WebCoreTestSupport.h, needed to link in window.internals code.
+                    ],
+                    'sources': [
+                        'src/WebTestingSupport.cpp',
+                        'public/WebTestingSupport.h',
+                    ],
+                }],
             ],
         },
         {
diff --git a/Source/WebKit/chromium/public/WebTestingSupport.h b/Source/WebKit/chromium/public/WebTestingSupport.h
new file mode 100644 (file)
index 0000000..cdf4555
--- /dev/null
@@ -0,0 +1,42 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#ifndef WebTestingSupport_h
+#define WebTestingSupport_h
+
+#include "WebCommon.h"
+
+namespace WebKit {
+
+class WebFrame;
+
+class WebTestingSupport {
+public:
+    WEBKIT_API static void injectInternalsObject(WebFrame*);
+};
+
+}
+
+#endif
diff --git a/Source/WebKit/chromium/src/WebTestingSupport.cpp b/Source/WebKit/chromium/src/WebTestingSupport.cpp
new file mode 100644 (file)
index 0000000..2815984
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2011 Google Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * 1.  Redistributions of source code must retain the above copyright
+ *     notice, this list of conditions and the following disclaimer.
+ * 2.  Redistributions in binary form must reproduce the above copyright
+ *     notice, this list of conditions and the following disclaimer in the
+ *     documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE AND ITS CONTRIBUTORS "AS IS" AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+ * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+ * DISCLAIMED. IN NO EVENT SHALL APPLE OR ITS CONTRIBUTORS BE LIABLE FOR ANY
+ * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+ * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+ * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+#include "config.h"
+#include "WebTestingSupport.h"
+
+#include "WebCoreTestSupport.h"
+#include "WebFrame.h"
+#include <v8/include/v8.h>
+
+namespace WebKit {
+
+void WebTestingSupport::injectInternalsObject(WebFrame* frame)
+{
+    v8::HandleScope handleScope;
+    WebCoreTestSupport::injectInternalsObject(frame->mainWorldScriptContext());
+}
+
+}
index 469c60b..b6a0831 100644 (file)
@@ -1,3 +1,16 @@
+2011-05-21  Dimitri Glazkov  <dglazkov@chromium.org>
+
+        Reviewed by Darin Adler.
+
+        Add build logistics and plumbing for window.internals object.
+        https://bugs.webkit.org/show_bug.cgi?id=60313
+
+        * DumpRenderTree/DumpRenderTree.xcodeproj/project.pbxproj: Added linking new WebCoreTestSupport library.
+        * DumpRenderTree/chromium/TestShell.cpp:
+        (TestShell::bindJSObjectsToWindow): Added injection code.
+        * DumpRenderTree/mac/FrameLoadDelegate.mm:
+        (-[FrameLoadDelegate didClearWindowObjectInStandardWorldForFrame:]): Ditto.
+
 2011-06-02  Gyuyoung Kim  <gyuyoung.kim@samsung.com>
 
         Reviewed by Eric Seidel.
index 736a103..dbbb936 100644 (file)
@@ -56,6 +56,8 @@
                3713EDE3115BE19300705720 /* ColorBits.ttf in Copy Font Files */ = {isa = PBXBuildFile; fileRef = 3713EDE0115BE16F00705720 /* ColorBits.ttf */; };
                3A5626CB131CA02A002BE6D9 /* StorageTrackerDelegate.mm in Sources */ = {isa = PBXBuildFile; fileRef = 3A5626C1131C8B17002BE6D9 /* StorageTrackerDelegate.mm */; };
                3A5626CC131CA036002BE6D9 /* StorageTrackerDelegate.h in Headers */ = {isa = PBXBuildFile; fileRef = 3A5626C0131C8B17002BE6D9 /* StorageTrackerDelegate.h */; };
+               41230BAD138C47AE00BCCFCA /* WebCoreTestSupport.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 41230BAA138C477A00BCCFCA /* WebCoreTestSupport.dylib */; };
+               417DAA1D137B3E24007C57FB /* WebCoreTestSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 417DAA1C137B3E24007C57FB /* WebCoreTestSupport.h */; };
                440590711268453800CFD48D /* WebArchiveDumpSupportMac.mm in Sources */ = {isa = PBXBuildFile; fileRef = 440590701268453800CFD48D /* WebArchiveDumpSupportMac.mm */; };
                4437730E125CBC3600AAE02C /* WebArchiveDumpSupport.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 44A997830FCDE86400580F10 /* WebArchiveDumpSupport.cpp */; };
                4437730F125CBC4D00AAE02C /* WebArchiveDumpSupport.h in Headers */ = {isa = PBXBuildFile; fileRef = 44A997820FCDE86400580F10 /* WebArchiveDumpSupport.h */; };
                375F09790DAC3CB600C8B4E5 /* WebKitWeightWatcher900.ttf */ = {isa = PBXFileReference; lastKnownFileType = file; name = WebKitWeightWatcher900.ttf; path = fonts/WebKitWeightWatcher900.ttf; sourceTree = "<group>"; };
                3A5626C0131C8B17002BE6D9 /* StorageTrackerDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = StorageTrackerDelegate.h; sourceTree = "<group>"; };
                3A5626C1131C8B17002BE6D9 /* StorageTrackerDelegate.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = StorageTrackerDelegate.mm; sourceTree = "<group>"; };
+               41230BAA138C477A00BCCFCA /* WebCoreTestSupport.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; path = WebCoreTestSupport.dylib; sourceTree = BUILT_PRODUCTS_DIR; };
+               41230DF5138C759E00BCCFCA /* WebCoreTestSupport.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = WebCoreTestSupport.dylib; path = /Volumes/Work/WebKit/WebKitBuild/Debug/WebCoreTestSupport.dylib; sourceTree = "<absolute>"; };
+               417DAA1C137B3E24007C57FB /* WebCoreTestSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebCoreTestSupport.h; path = WebCoreTestSupport/WebCoreTestSupport.h; sourceTree = BUILT_PRODUCTS_DIR; };
                440590701268453800CFD48D /* WebArchiveDumpSupportMac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = WebArchiveDumpSupportMac.mm; path = mac/WebArchiveDumpSupportMac.mm; sourceTree = "<group>"; };
                44A997820FCDE86400580F10 /* WebArchiveDumpSupport.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WebArchiveDumpSupport.h; path = cf/WebArchiveDumpSupport.h; sourceTree = "<group>"; };
                44A997830FCDE86400580F10 /* WebArchiveDumpSupport.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WebArchiveDumpSupport.cpp; path = cf/WebArchiveDumpSupport.cpp; sourceTree = "<group>"; };
                                A817090408B164D300CCB9FB /* JavaScriptCore.framework in Frameworks */,
                                23BCB8900EA57623003C6289 /* OpenGL.framework in Frameworks */,
                                9340995108540CAE007F3BC8 /* WebKit.framework in Frameworks */,
+                               41230BAD138C47AE00BCCFCA /* WebCoreTestSupport.dylib in Frameworks */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
                                A8B91AC40CF3B170008F91FF /* ObjCPlugin */,
                                141BF1F5096A439800E0753C /* TestNetscapePlugIn */,
                                9345229B0BD12B2C0086EDA0 /* Resources */,
+                               417DA9181373674D007C57FB /* WebCoreTestSupport */,
                                A803FF6409CAACC1009B2A37 /* Frameworks */,
                                9340995508540CAF007F3BC8 /* Products */,
                                BCB281ED0CFA711D007E533E /* Configurations */,
+                               41230DF5138C759E00BCCFCA /* WebCoreTestSupport.dylib */,
                        );
                        name = DumpRenderTree;
                        sourceTree = "<group>";
                        path = mac;
                        sourceTree = "<group>";
                };
+               417DA9181373674D007C57FB /* WebCoreTestSupport */ = {
+                       isa = PBXGroup;
+                       children = (
+                               417DAA1C137B3E24007C57FB /* WebCoreTestSupport.h */,
+                               41230BAA138C477A00BCCFCA /* WebCoreTestSupport.dylib */,
+                       );
+                       name = WebCoreTestSupport;
+                       sourceTree = "<group>";
+               };
                9340995508540CAF007F3BC8 /* Products */ = {
                        isa = PBXGroup;
                        children = (
                                E1B7816711AF31C3007E1BC2 /* MockGeolocationProvider.h in Headers */,
                                29CFBA10122736E600BC30C0 /* AccessibilityTextMarker.h in Headers */,
                                3A5626CC131CA036002BE6D9 /* StorageTrackerDelegate.h in Headers */,
+                               417DAA1D137B3E24007C57FB /* WebCoreTestSupport.h in Headers */,
                        );
                        runOnlyForDeploymentPostprocessing = 0;
                };
index a298ff7..dc64053 100644 (file)
@@ -39,6 +39,7 @@
 #include "WebElement.h"
 #include "WebFrame.h"
 #include "WebHistoryItem.h"
+#include "WebTestingSupport.h"
 #include "WebKit.h"
 #include "WebPermissions.h"
 #include "WebRuntimeFeatures.h"
@@ -583,6 +584,7 @@ void TestShell::dumpImage(SkCanvas* canvas) const
 
 void TestShell::bindJSObjectsToWindow(WebFrame* frame)
 {
+    WebTestingSupport::injectInternalsObject(frame);
     m_accessibilityController->bindToJavascript(frame, WebString::fromUTF8("accessibilityController"));
     m_layoutTestController->bindToJavascript(frame, WebString::fromUTF8("layoutTestController"));
     m_eventSender->bindToJavascript(frame, WebString::fromUTF8("eventSender"));
index 27939df..7c4a5ec 100644 (file)
@@ -41,6 +41,7 @@
 #import "ObjCPluginFunction.h"
 #import "PlainTextController.h"
 #import "TextInputController.h"
+#import "WebCoreTestSupport.h"
 #import "WorkQueue.h"
 #import "WorkQueueItem.h"
 #import <JavaScriptCore/JavaScriptCore.h>
     accessibilityController->makeWindowObject(context, globalObject, &exception);
     ASSERT(!exception);
 
+    WebCoreTestSupport::injectInternalsObject(context);
+
     // Make Old-Style controllers
 
     WebView *webView = [frame webView];