[DRT] LTC:: counterValueForElementById() could be moved to Internals.
authorkaustubh@motorola.com <kaustubh@motorola.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Jun 2012 10:47:39 +0000 (10:47 +0000)
committerkaustubh@motorola.com <kaustubh@motorola.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 12 Jun 2012 10:47:39 +0000 (10:47 +0000)
https://bugs.webkit.org/show_bug.cgi?id=84406

Reviewed by Hajime Morita.

.:

Exporting Internals::counterValueForElement symbols for the Gtk build.

* Source/autotools/symbols.filter:

Source/WebCore:

Move the counterValueForElementById from LayoutTestCotroller to Internals and
remove the old platform specific implementations as it exclusively tests WebCore functionality.

Covered by existing test cases.

* testing/Internals.cpp:
(WebCore::Internals::counterValue):
(WebCore):
* testing/Internals.h:
(Internals):
* testing/Internals.idl:

Source/WebKit/efl:

Move the counterValueForElementById from LayoutTestCotroller to Internals and
remove the old platform specific implementations as it exclusively tests WebCore functionality.

* WebCoreSupport/DumpRenderTreeSupportEfl.cpp:

Source/WebKit/gtk:

Move the counterValueForElementById from LayoutTestCotroller to Internals and
remove the old platform specific implementations as it exclusively tests WebCore functionality.

* WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
* WebCoreSupport/DumpRenderTreeSupportGtk.h:
(DumpRenderTreeSupportGtk):

Source/WebKit/qt:

Move the counterValueForElementById from LayoutTestCotroller to Internals and
remove the old platform specific implementations as it exclusively tests WebCore functionality.

* WebCoreSupport/DumpRenderTreeSupportQt.cpp:
* WebCoreSupport/DumpRenderTreeSupportQt.h:

Source/WebKit/win:

Move the counterValueForElementById from LayoutTestCotroller to Internals and
remove the old platform specific implementations as it exclusively tests WebCore functionality.

* Interfaces/IWebFramePrivate.idl:
* WebFrame.cpp:
* WebFrame.h:

Source/WebKit2:

Exporting Internals::counterValueForElement symbols for the win build.

* win/WebKit2.def:

Tools:

Move the counterValueForElementById from LayoutTestCotroller to Internals and
remove the old platform specific implementations as it exclusively tests WebCore functionality.

* DumpRenderTree/LayoutTestController.cpp:
(LayoutTestController::staticFunctions):
* DumpRenderTree/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp:
* DumpRenderTree/chromium/LayoutTestController.cpp:
(LayoutTestController::LayoutTestController):
(LayoutTestController::setPOSIXLocale):
* DumpRenderTree/chromium/LayoutTestController.h:
(LayoutTestController):
* DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
* DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
* DumpRenderTree/mac/LayoutTestControllerMac.mm:
* DumpRenderTree/qt/LayoutTestControllerQt.cpp:
* DumpRenderTree/qt/LayoutTestControllerQt.h:
(LayoutTestController):
* DumpRenderTree/win/LayoutTestControllerWin.cpp:
* DumpRenderTree/wx/LayoutTestControllerWx.cpp:
* WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
* WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
(WTR):
* WebKitTestRunner/InjectedBundle/LayoutTestController.h:
(LayoutTestController):

LayoutTests:

Move the counterValueForElementById from LayoutTestCotroller to Internals and
remove the old platform specific implementations as it exclusively tests WebCore functionality.

* fast/css/counters/2displays-expected.txt:
* fast/css/counters/2displays.html:
* fast/css/counters/adding-nodes.html:
* fast/css/counters/after-continuation-expected.txt:
* fast/css/counters/after-continuation.html:
* fast/css/counters/content-021-expected.txt:
* fast/css/counters/content-021.html:
* fast/css/counters/counter-before-content-not-incremented.html:
* fast/css/counters/counter-increment-000-expected.txt:
* fast/css/counters/counter-increment-000.html:
* fast/css/counters/counter-increment-001-expected.txt:
* fast/css/counters/counter-increment-001.html:
* fast/css/counters/counter-increment-002.html:
* fast/css/counters/counter-increment-inherit-expected.txt:
* fast/css/counters/counter-increment-inherit.htm:
* fast/css/counters/counter-increment-overflow.html:
* fast/css/counters/counter-increment-tests-expected.txt:
* fast/css/counters/counter-increment-tests.htm:
* fast/css/counters/counter-reset-000.html:
* fast/css/counters/counter-reset-001.html:
* fast/css/counters/counter-reset-002.html:
* fast/css/counters/counterValueForElementById-expected.txt:
* fast/css/counters/counterValueForElementById.html:
* fast/css/counters/deep-before-expected.txt:
* fast/css/counters/deep-before.html:
* fast/css/counters/invalidate-cached-counter-node.html:
* fast/css/counters/nesting.html:

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

64 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/fast/css/counters/2displays-expected.txt
LayoutTests/fast/css/counters/2displays.html
LayoutTests/fast/css/counters/adding-nodes.html
LayoutTests/fast/css/counters/after-continuation-expected.txt
LayoutTests/fast/css/counters/after-continuation.html
LayoutTests/fast/css/counters/content-021-expected.txt
LayoutTests/fast/css/counters/content-021.html
LayoutTests/fast/css/counters/counter-before-content-not-incremented.html
LayoutTests/fast/css/counters/counter-increment-000-expected.txt
LayoutTests/fast/css/counters/counter-increment-000.html
LayoutTests/fast/css/counters/counter-increment-001-expected.txt
LayoutTests/fast/css/counters/counter-increment-001.html
LayoutTests/fast/css/counters/counter-increment-002.html
LayoutTests/fast/css/counters/counter-increment-inherit-expected.txt
LayoutTests/fast/css/counters/counter-increment-inherit.htm
LayoutTests/fast/css/counters/counter-increment-overflow.html
LayoutTests/fast/css/counters/counter-increment-tests-expected.txt
LayoutTests/fast/css/counters/counter-increment-tests.htm
LayoutTests/fast/css/counters/counter-reset-000.html
LayoutTests/fast/css/counters/counter-reset-001.html
LayoutTests/fast/css/counters/counter-reset-002.html
LayoutTests/fast/css/counters/counterValueForElementById-expected.txt
LayoutTests/fast/css/counters/counterValueForElementById.html
LayoutTests/fast/css/counters/deep-before-expected.txt
LayoutTests/fast/css/counters/deep-before.html
LayoutTests/fast/css/counters/invalidate-cached-counter-node.html
LayoutTests/fast/css/counters/nesting.html
Source/WebCore/ChangeLog
Source/WebCore/testing/Internals.cpp
Source/WebCore/testing/Internals.h
Source/WebCore/testing/Internals.idl
Source/WebKit/efl/ChangeLog
Source/WebKit/efl/WebCoreSupport/DumpRenderTreeSupportEfl.cpp
Source/WebKit/gtk/ChangeLog
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.cpp
Source/WebKit/gtk/WebCoreSupport/DumpRenderTreeSupportGtk.h
Source/WebKit/qt/ChangeLog
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.cpp
Source/WebKit/qt/WebCoreSupport/DumpRenderTreeSupportQt.h
Source/WebKit/win/ChangeLog
Source/WebKit/win/Interfaces/IWebFramePrivate.idl
Source/WebKit/win/WebFrame.cpp
Source/WebKit/win/WebFrame.h
Source/WebKit2/ChangeLog
Source/WebKit2/win/WebKit2.def
Source/autotools/symbols.filter
Tools/ChangeLog
Tools/DumpRenderTree/LayoutTestController.cpp
Tools/DumpRenderTree/LayoutTestController.h
Tools/DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp
Tools/DumpRenderTree/chromium/LayoutTestController.cpp
Tools/DumpRenderTree/chromium/LayoutTestController.h
Tools/DumpRenderTree/efl/LayoutTestControllerEfl.cpp
Tools/DumpRenderTree/gtk/LayoutTestControllerGtk.cpp
Tools/DumpRenderTree/mac/LayoutTestControllerMac.mm
Tools/DumpRenderTree/qt/LayoutTestControllerQt.cpp
Tools/DumpRenderTree/qt/LayoutTestControllerQt.h
Tools/DumpRenderTree/win/LayoutTestControllerWin.cpp
Tools/DumpRenderTree/wx/LayoutTestControllerWx.cpp
Tools/WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl
Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.cpp
Tools/WebKitTestRunner/InjectedBundle/LayoutTestController.h

index 9f07b40..1b36eae 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+2012-06-11  Kaustubh Atrawalkar  <kaustubh@motorola.com>
+
+        [DRT] LTC:: counterValueForElementById() could be moved to Internals.
+        https://bugs.webkit.org/show_bug.cgi?id=84406
+
+        Reviewed by Hajime Morita.
+
+        Exporting Internals::counterValueForElement symbols for the Gtk build.
+
+        * Source/autotools/symbols.filter:
+
 2012-06-11  Alexis Menard  <alexis.menard@openbossa.org>
 
         [CSS3 Backgrounds and Borders] Protect box-decoration-break behind a feature flag.
index 7944cda..11faa5c 100644 (file)
@@ -1,3 +1,41 @@
+2012-06-11  Kaustubh Atrawalkar  <kaustubh@motorola.com>
+
+        [DRT] LTC:: counterValueForElementById() could be moved to Internals.
+        https://bugs.webkit.org/show_bug.cgi?id=84406
+
+        Reviewed by Hajime Morita.
+
+        Move the counterValueForElementById from LayoutTestCotroller to Internals and
+        remove the old platform specific implementations as it exclusively tests WebCore functionality.
+
+        * fast/css/counters/2displays-expected.txt:
+        * fast/css/counters/2displays.html:
+        * fast/css/counters/adding-nodes.html:
+        * fast/css/counters/after-continuation-expected.txt:
+        * fast/css/counters/after-continuation.html:
+        * fast/css/counters/content-021-expected.txt:
+        * fast/css/counters/content-021.html:
+        * fast/css/counters/counter-before-content-not-incremented.html:
+        * fast/css/counters/counter-increment-000-expected.txt:
+        * fast/css/counters/counter-increment-000.html:
+        * fast/css/counters/counter-increment-001-expected.txt:
+        * fast/css/counters/counter-increment-001.html:
+        * fast/css/counters/counter-increment-002.html:
+        * fast/css/counters/counter-increment-inherit-expected.txt:
+        * fast/css/counters/counter-increment-inherit.htm:
+        * fast/css/counters/counter-increment-overflow.html:
+        * fast/css/counters/counter-increment-tests-expected.txt:
+        * fast/css/counters/counter-increment-tests.htm:
+        * fast/css/counters/counter-reset-000.html:
+        * fast/css/counters/counter-reset-001.html:
+        * fast/css/counters/counter-reset-002.html:
+        * fast/css/counters/counterValueForElementById-expected.txt:
+        * fast/css/counters/counterValueForElementById.html:
+        * fast/css/counters/deep-before-expected.txt:
+        * fast/css/counters/deep-before.html:
+        * fast/css/counters/invalidate-cached-counter-node.html:
+        * fast/css/counters/nesting.html:
+
 2012-06-11  Hans Wennborg  <hans@chromium.org>
 
         Speech JavaScript API: Make SpeechRecognitionError an Event
index f111228..417b522 100644 (file)
@@ -6,5 +6,5 @@ On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE
 PASS successfullyParsed is true
 
 TEST COMPLETE
-PASS layoutTestController.counterValueForElementById('testView') is '1000 1000'
+PASS window.internals.counterValue(document.getElementById('testView')) is '1000 1000'
 
index cd1eb93..6836602 100644 (file)
@@ -31,7 +31,7 @@ function run()
     document.getElementById("testView").setAttribute("class", "counter1000");
     if (!window.layoutTestController)
         return;
-    shouldBe("layoutTestController.counterValueForElementById('testView')", "'1000 1000'");
+    shouldBe("window.internals.counterValue(document.getElementById('testView'))", "'1000 1000'");
 
     if (window.layoutTestController)
         layoutTestController.notifyDone();
index 3ab498b..6dae393 100644 (file)
@@ -34,7 +34,7 @@
                     newSpanElement = document.createElement("span");
                     id = spanList.item(i).getAttribute("id");
                     if (id != null)
-                        newSpanElement.innerText = layoutTestController.counterValueForElementById(id);
+                        newSpanElement.innerText = window.internals.counterValue(document.getElementById(id));
                     if (newSpanElement.innerText.length)
                         newSpanElement.innerText = newSpanElement.innerText + "-";
                     console.appendChild(newSpanElement);
index 7da4b32..1fb62c7 100644 (file)
@@ -1,6 +1,6 @@
 This test passes if the numbers displayed below are 1 and 2 in this order.
 
-PASS layoutTestController.counterValueForElementById('c2') is '2'
+PASS window.internals.counterValue(document.getElementById('c2')) is '2'
 
 TEST COMPLETE
 
index 64c6260..33588f4 100644 (file)
@@ -10,7 +10,7 @@
         }
         function run()
         {
-            shouldBe("layoutTestController.counterValueForElementById('c2')", "'2'");
+            shouldBe("window.internals.counterValue(document.getElementById('c2'))", "'2'");
 
             debug('');
             debug('TEST COMPLETE');
index 86f0d15..9839989 100644 (file)
@@ -1,7 +1,7 @@
 This is the WebKit version of CSS Test: Content using a 'counters()' function with a string value.
 
-PASS layoutTestController.counterValueForElementById('div1') is '0'
-PASS layoutTestController.counterValueForElementById('div2') is '0.0'
+PASS window.internals.counterValue(document.getElementById('div1')) is '0'
+PASS window.internals.counterValue(document.getElementById('div2')) is '0.0'
 
 TEST COMPLETE
 
index 21c4ad7..63704d5 100644 (file)
@@ -28,8 +28,8 @@
   {
       if (!window.layoutTestController)
           return;
-      shouldBe("layoutTestController.counterValueForElementById('div1')", "'0'");
-      shouldBe("layoutTestController.counterValueForElementById('div2')", "'0.0'");
+      shouldBe("window.internals.counterValue(document.getElementById('div1'))", "'0'");
+      shouldBe("window.internals.counterValue(document.getElementById('div2'))", "'0.0'");
 
       debug('');
       debug('TEST COMPLETE');
index 0f4a10b..90ea1fb 100644 (file)
@@ -43,7 +43,7 @@
             for (var i = 0; i < spanList.length; ++i ) {
                 var divItem = spanList.item(i);
                 counters += '-';
-                counters += layoutTestController.counterValueForElementById(divItem.getAttribute("id"));
+                counters += window.internals.counterValue(document.getElementById(divItem.getAttribute("id")));
                 counters += divItem.textContent;
             }
             document.getElementById("container").innerHTML = counters;
index c459c80..358946b 100644 (file)
@@ -1,14 +1,14 @@
 This is the WebKit version of CSS 2.1 Test Suite: dynamic changes to 'counter-increment'.
 
 Before the dynamic change:
-PASS layoutTestController.counterValueForElementById('one') is '1'
-PASS layoutTestController.counterValueForElementById('three') is '2'
-PASS layoutTestController.counterValueForElementById('four') is '3'
+PASS window.internals.counterValue(document.getElementById('one')) is '1'
+PASS window.internals.counterValue(document.getElementById('three')) is '2'
+PASS window.internals.counterValue(document.getElementById('four')) is '3'
 After the dynamic change:
-PASS layoutTestController.counterValueForElementById('one') is '1'
-PASS layoutTestController.counterValueForElementById('two') is '2'
-PASS layoutTestController.counterValueForElementById('three') is '3'
-PASS layoutTestController.counterValueForElementById('four') is '4'
+PASS window.internals.counterValue(document.getElementById('one')) is '1'
+PASS window.internals.counterValue(document.getElementById('two')) is '2'
+PASS window.internals.counterValue(document.getElementById('three')) is '3'
+PASS window.internals.counterValue(document.getElementById('four')) is '4'
 
 TEST COMPLETE
 
index 5120034..0971cbd 100644 (file)
   function checkCounterValuesBeforeChange()
   {
       debug('Before the dynamic change:');
-      shouldBe("layoutTestController.counterValueForElementById('one')", "'1'");
-      shouldBe("layoutTestController.counterValueForElementById('three')", "'2'");
-      shouldBe("layoutTestController.counterValueForElementById('four')", "'3'");
+      shouldBe("window.internals.counterValue(document.getElementById('one'))", "'1'");
+      shouldBe("window.internals.counterValue(document.getElementById('three'))", "'2'");
+      shouldBe("window.internals.counterValue(document.getElementById('four'))", "'3'");
   }
 
   function checkCounterValuesAfterChange()
   {
       debug('After the dynamic change:');
-      shouldBe("layoutTestController.counterValueForElementById('one')", "'1'");
-      shouldBe("layoutTestController.counterValueForElementById('two')", "'2'");
-      shouldBe("layoutTestController.counterValueForElementById('three')", "'3'");
-      shouldBe("layoutTestController.counterValueForElementById('four')", "'4'");
+      shouldBe("window.internals.counterValue(document.getElementById('one'))", "'1'");
+      shouldBe("window.internals.counterValue(document.getElementById('two'))", "'2'");
+      shouldBe("window.internals.counterValue(document.getElementById('three'))", "'3'");
+      shouldBe("window.internals.counterValue(document.getElementById('four'))", "'4'");
 
       debug('');
       debug('TEST COMPLETE');
index 23f45b9..0a6e7d7 100644 (file)
@@ -1,13 +1,13 @@
 This is the WebKit version of CSS 2.1 Test Suite: dynamic changes to 'counter-increment'.
 
 Before the dynamic change:
-PASS layoutTestController.counterValueForElementById('one') is '1'
-PASS layoutTestController.counterValueForElementById('two') is '3'
-PASS layoutTestController.counterValueForElementById('three') is '4'
+PASS window.internals.counterValue(document.getElementById('one')) is '1'
+PASS window.internals.counterValue(document.getElementById('two')) is '3'
+PASS window.internals.counterValue(document.getElementById('three')) is '4'
 After the dynamic change:
-PASS layoutTestController.counterValueForElementById('one') is '1'
-PASS layoutTestController.counterValueForElementById('two') is '2'
-PASS layoutTestController.counterValueForElementById('three') is '3'
+PASS window.internals.counterValue(document.getElementById('one')) is '1'
+PASS window.internals.counterValue(document.getElementById('two')) is '2'
+PASS window.internals.counterValue(document.getElementById('three')) is '3'
 
 TEST COMPLETE
 
index d3acf75..27e8150 100644 (file)
   function checkCounterValuesBeforeChange()
   {
       debug('Before the dynamic change:');
-      shouldBe("layoutTestController.counterValueForElementById('one')", "'1'");
-      shouldBe("layoutTestController.counterValueForElementById('two')", "'3'");
-      shouldBe("layoutTestController.counterValueForElementById('three')", "'4'");
+      shouldBe("window.internals.counterValue(document.getElementById('one'))", "'1'");
+      shouldBe("window.internals.counterValue(document.getElementById('two'))", "'3'");
+      shouldBe("window.internals.counterValue(document.getElementById('three'))", "'4'");
   }
 
   function checkCounterValuesAfterChange()
   {
       debug('After the dynamic change:');
-      shouldBe("layoutTestController.counterValueForElementById('one')", "'1'");
-      shouldBe("layoutTestController.counterValueForElementById('two')", "'2'");
-      shouldBe("layoutTestController.counterValueForElementById('three')", "'3'");
+      shouldBe("window.internals.counterValue(document.getElementById('one'))", "'1'");
+      shouldBe("window.internals.counterValue(document.getElementById('two'))", "'2'");
+      shouldBe("window.internals.counterValue(document.getElementById('three'))", "'3'");
 
       debug('');
       debug('TEST COMPLETE');
index e83d54c..c31617c 100644 (file)
@@ -32,7 +32,7 @@
                 for (i = 0; i < spanList.length; ++i ) {
                     newSpanElement = document.createElement("span");
                     newSpanElement.innerText =
-                    layoutTestController.counterValueForElementById(spanList.item(i).getAttribute("id"));
+                    window.internals.counterValue(document.getElementById(spanList.item(i).getAttribute("id")));
                     if (newSpanElement.innerText.length)
                         newSpanElement.innerText = newSpanElement.innerText + "-";
                     console.appendChild(newSpanElement);
index c824584..8b109f5 100644 (file)
@@ -1,7 +1,7 @@
-PASS layoutTestController.counterValueForElementById('wrapper90') is '5'
-PASS layoutTestController.counterValueForElementById('test90') is '10'
-PASS layoutTestController.counterValueForElementById('test90a') is '15'
-PASS layoutTestController.counterValueForElementById('wrapper91') is '10'
-PASS layoutTestController.counterValueForElementById('test91') is '20'
-PASS layoutTestController.counterValueForElementById('test91a') is '30'
+PASS window.internals.counterValue(document.getElementById('wrapper90')) is '5'
+PASS window.internals.counterValue(document.getElementById('test90')) is '10'
+PASS window.internals.counterValue(document.getElementById('test90a')) is '15'
+PASS window.internals.counterValue(document.getElementById('wrapper91')) is '10'
+PASS window.internals.counterValue(document.getElementById('test91')) is '20'
+PASS window.internals.counterValue(document.getElementById('test91a')) is '30'
 
index afe6544..3b14ef8 100644 (file)
             function run()
             {
                 // Some extra WebKit testing for counter-increment inherit
-                shouldBe("layoutTestController.counterValueForElementById('wrapper90')", "'5'");
-                shouldBe("layoutTestController.counterValueForElementById('test90')", "'10'");
-                shouldBe("layoutTestController.counterValueForElementById('test90a')", "'15'");
-                shouldBe("layoutTestController.counterValueForElementById('wrapper91')", "'10'");
-                shouldBe("layoutTestController.counterValueForElementById('test91')", "'20'");
-                shouldBe("layoutTestController.counterValueForElementById('test91a')", "'30'");
+                shouldBe("window.internals.counterValue(document.getElementById('wrapper90'))", "'5'");
+                shouldBe("window.internals.counterValue(document.getElementById('test90'))", "'10'");
+                shouldBe("window.internals.counterValue(document.getElementById('test90a'))", "'15'");
+                shouldBe("window.internals.counterValue(document.getElementById('wrapper91'))", "'10'");
+                shouldBe("window.internals.counterValue(document.getElementById('test91'))", "'20'");
+                shouldBe("window.internals.counterValue(document.getElementById('test91a'))", "'30'");
                 if (window.layoutTestController)
                     layoutTestController.notifyDone();
             }
index 48026e1..6802829 100644 (file)
@@ -18,7 +18,7 @@
         function doTest()
         {
             if (window.layoutTestController)
-                document.getElementById('counted').innerText = layoutTestController.counterValueForElementById('counted');
+                document.getElementById('counted').innerText = window.internals.counterValue(document.getElementById('counted'));
         }
 
         window.addEventListener('load', doTest, false);
index e2b61c1..5bac812 100644 (file)
@@ -1,58 +1,58 @@
-PASS layoutTestController.counterValueForElementById('test3') is '-2147483648'
-PASS layoutTestController.counterValueForElementById('test4') is '-2147483647'
-PASS layoutTestController.counterValueForElementById('test5') is '0'
-PASS layoutTestController.counterValueForElementById('test6') is '0'
-PASS layoutTestController.counterValueForElementById('test7') is '0'
-PASS layoutTestController.counterValueForElementById('test8') is '10'
-PASS layoutTestController.counterValueForElementById('test9') is '10'
-PASS layoutTestController.counterValueForElementById('test10') is '2147483646'
-PASS layoutTestController.counterValueForElementById('test11') is '2147483647'
-PASS layoutTestController.counterValueForElementById('test12') is '2147483647'
-PASS layoutTestController.counterValueForElementById('test13') is '2147483647'
-PASS layoutTestController.counterValueForElementById('test14') is '2'
-PASS layoutTestController.counterValueForElementById('test15') is '-2147483648'
-PASS layoutTestController.counterValueForElementById('test16') is '-2147483648'
-PASS layoutTestController.counterValueForElementById('test17') is '-2147483648'
-PASS layoutTestController.counterValueForElementById('test18') is '0'
-PASS layoutTestController.counterValueForElementById('test19') is '0'
-PASS layoutTestController.counterValueForElementById('test20') is '0'
-PASS layoutTestController.counterValueForElementById('test21') is '20'
-PASS layoutTestController.counterValueForElementById('test22') is '20'
-PASS layoutTestController.counterValueForElementById('test23') is '2147483647'
-PASS layoutTestController.counterValueForElementById('test24') is '2147483647'
-PASS layoutTestController.counterValueForElementById('test25') is '2147483647'
-PASS layoutTestController.counterValueForElementById('test26') is '2147483647'
-PASS layoutTestController.counterValueForElementById('test27') is '3'
-PASS layoutTestController.counterValueForElementById('test28') is '-2147483648'
-PASS layoutTestController.counterValueForElementById('test29') is '-2147483648'
-PASS layoutTestController.counterValueForElementById('test30') is '-2147483648'
-PASS layoutTestController.counterValueForElementById('test31') is '0'
-PASS layoutTestController.counterValueForElementById('test32') is '0'
-PASS layoutTestController.counterValueForElementById('test33') is '0'
-PASS layoutTestController.counterValueForElementById('test34') is '30'
-PASS layoutTestController.counterValueForElementById('test35') is '30'
-PASS layoutTestController.counterValueForElementById('test36') is '2147483647'
-PASS layoutTestController.counterValueForElementById('test37') is '2147483647'
-PASS layoutTestController.counterValueForElementById('test38') is '2147483647'
-PASS layoutTestController.counterValueForElementById('test39') is '2147483647'
-PASS layoutTestController.counterValueForElementById('test40') is '32'
-PASS layoutTestController.counterValueForElementById('test41') is '-2147483648'
-PASS layoutTestController.counterValueForElementById('test42') is '-2147483648'
-PASS layoutTestController.counterValueForElementById('test43') is '-2147483648'
-PASS layoutTestController.counterValueForElementById('test44') is '0'
-PASS layoutTestController.counterValueForElementById('test45') is '0'
-PASS layoutTestController.counterValueForElementById('test46') is '0'
-PASS layoutTestController.counterValueForElementById('test47') is '320'
-PASS layoutTestController.counterValueForElementById('test48') is '320'
-PASS layoutTestController.counterValueForElementById('test49') is '2147483647'
-PASS layoutTestController.counterValueForElementById('test50') is '2147483647'
-PASS layoutTestController.counterValueForElementById('test51') is '2147483647'
-PASS layoutTestController.counterValueForElementById('test52') is '2147483647'
-PASS layoutTestController.counterValueForElementById('test53') is '5'
-PASS layoutTestController.counterValueForElementById('none53') is '5'
-PASS layoutTestController.counterValueForElementById('test53a') is '10'
-PASS layoutTestController.counterValueForElementById('wrapper54') is '5'
-PASS layoutTestController.counterValueForElementById('test54') is '10'
-PASS layoutTestController.counterValueForElementById('test55') is '1'
-PASS layoutTestController.counterValueForElementById('test56') is '-2147483648'
+PASS window.internals.counterValue(document.getElementById('test3')) is '-2147483648'
+PASS window.internals.counterValue(document.getElementById('test4')) is '-2147483647'
+PASS window.internals.counterValue(document.getElementById('test5')) is '0'
+PASS window.internals.counterValue(document.getElementById('test6')) is '0'
+PASS window.internals.counterValue(document.getElementById('test7')) is '0'
+PASS window.internals.counterValue(document.getElementById('test8')) is '10'
+PASS window.internals.counterValue(document.getElementById('test9')) is '10'
+PASS window.internals.counterValue(document.getElementById('test10')) is '2147483646'
+PASS window.internals.counterValue(document.getElementById('test11')) is '2147483647'
+PASS window.internals.counterValue(document.getElementById('test12')) is '2147483647'
+PASS window.internals.counterValue(document.getElementById('test13')) is '2147483647'
+PASS window.internals.counterValue(document.getElementById('test14')) is '2'
+PASS window.internals.counterValue(document.getElementById('test15')) is '-2147483648'
+PASS window.internals.counterValue(document.getElementById('test16')) is '-2147483648'
+PASS window.internals.counterValue(document.getElementById('test17')) is '-2147483648'
+PASS window.internals.counterValue(document.getElementById('test18')) is '0'
+PASS window.internals.counterValue(document.getElementById('test19')) is '0'
+PASS window.internals.counterValue(document.getElementById('test20')) is '0'
+PASS window.internals.counterValue(document.getElementById('test21')) is '20'
+PASS window.internals.counterValue(document.getElementById('test22')) is '20'
+PASS window.internals.counterValue(document.getElementById('test23')) is '2147483647'
+PASS window.internals.counterValue(document.getElementById('test24')) is '2147483647'
+PASS window.internals.counterValue(document.getElementById('test25')) is '2147483647'
+PASS window.internals.counterValue(document.getElementById('test26')) is '2147483647'
+PASS window.internals.counterValue(document.getElementById('test27')) is '3'
+PASS window.internals.counterValue(document.getElementById('test28')) is '-2147483648'
+PASS window.internals.counterValue(document.getElementById('test29')) is '-2147483648'
+PASS window.internals.counterValue(document.getElementById('test30')) is '-2147483648'
+PASS window.internals.counterValue(document.getElementById('test31')) is '0'
+PASS window.internals.counterValue(document.getElementById('test32')) is '0'
+PASS window.internals.counterValue(document.getElementById('test33')) is '0'
+PASS window.internals.counterValue(document.getElementById('test34')) is '30'
+PASS window.internals.counterValue(document.getElementById('test35')) is '30'
+PASS window.internals.counterValue(document.getElementById('test36')) is '2147483647'
+PASS window.internals.counterValue(document.getElementById('test37')) is '2147483647'
+PASS window.internals.counterValue(document.getElementById('test38')) is '2147483647'
+PASS window.internals.counterValue(document.getElementById('test39')) is '2147483647'
+PASS window.internals.counterValue(document.getElementById('test40')) is '32'
+PASS window.internals.counterValue(document.getElementById('test41')) is '-2147483648'
+PASS window.internals.counterValue(document.getElementById('test42')) is '-2147483648'
+PASS window.internals.counterValue(document.getElementById('test43')) is '-2147483648'
+PASS window.internals.counterValue(document.getElementById('test44')) is '0'
+PASS window.internals.counterValue(document.getElementById('test45')) is '0'
+PASS window.internals.counterValue(document.getElementById('test46')) is '0'
+PASS window.internals.counterValue(document.getElementById('test47')) is '320'
+PASS window.internals.counterValue(document.getElementById('test48')) is '320'
+PASS window.internals.counterValue(document.getElementById('test49')) is '2147483647'
+PASS window.internals.counterValue(document.getElementById('test50')) is '2147483647'
+PASS window.internals.counterValue(document.getElementById('test51')) is '2147483647'
+PASS window.internals.counterValue(document.getElementById('test52')) is '2147483647'
+PASS window.internals.counterValue(document.getElementById('test53')) is '5'
+PASS window.internals.counterValue(document.getElementById('none53')) is '5'
+PASS window.internals.counterValue(document.getElementById('test53a')) is '10'
+PASS window.internals.counterValue(document.getElementById('wrapper54')) is '5'
+PASS window.internals.counterValue(document.getElementById('test54')) is '10'
+PASS window.internals.counterValue(document.getElementById('test55')) is '1'
+PASS window.internals.counterValue(document.getElementById('test56')) is '-2147483648'
 
index 8cdb2ef..1894bf5 100644 (file)
                 /* These are text versions of the counter-increment-* tests in the CSS 2.1 test suite.
                    So 'test3' here is equivalent to counter-increment-003.htm, and so on. 
                    WebKit dumpAsText versions of counter-increment-001 and 002 already exist in fast/css/counters */
-                shouldBe("layoutTestController.counterValueForElementById('test3')", "'-2147483648'");
-                shouldBe("layoutTestController.counterValueForElementById('test4')", "'-2147483647'");
-                shouldBe("layoutTestController.counterValueForElementById('test5')", "'0'");
-                shouldBe("layoutTestController.counterValueForElementById('test6')", "'0'");
-                shouldBe("layoutTestController.counterValueForElementById('test7')", "'0'");
-                shouldBe("layoutTestController.counterValueForElementById('test8')", "'10'");
-                shouldBe("layoutTestController.counterValueForElementById('test9')", "'10'");
-                shouldBe("layoutTestController.counterValueForElementById('test10')", "'2147483646'");
-                shouldBe("layoutTestController.counterValueForElementById('test11')", "'2147483647'");
-                shouldBe("layoutTestController.counterValueForElementById('test12')", "'2147483647'");
-                shouldBe("layoutTestController.counterValueForElementById('test13')", "'2147483647'");
-                shouldBe("layoutTestController.counterValueForElementById('test14')", "'2'");
-                shouldBe("layoutTestController.counterValueForElementById('test15')", "'-2147483648'");
-                shouldBe("layoutTestController.counterValueForElementById('test16')", "'-2147483648'");
-                shouldBe("layoutTestController.counterValueForElementById('test17')", "'-2147483648'");
-                shouldBe("layoutTestController.counterValueForElementById('test18')", "'0'");
-                shouldBe("layoutTestController.counterValueForElementById('test19')", "'0'");
-                shouldBe("layoutTestController.counterValueForElementById('test20')", "'0'");
-                shouldBe("layoutTestController.counterValueForElementById('test21')", "'20'");
-                shouldBe("layoutTestController.counterValueForElementById('test22')", "'20'");
-                shouldBe("layoutTestController.counterValueForElementById('test23')", "'2147483647'");
-                shouldBe("layoutTestController.counterValueForElementById('test24')", "'2147483647'");
-                shouldBe("layoutTestController.counterValueForElementById('test25')", "'2147483647'");
-                shouldBe("layoutTestController.counterValueForElementById('test26')", "'2147483647'");
-                shouldBe("layoutTestController.counterValueForElementById('test27')", "'3'");
-                shouldBe("layoutTestController.counterValueForElementById('test28')", "'-2147483648'");
-                shouldBe("layoutTestController.counterValueForElementById('test29')", "'-2147483648'");
-                shouldBe("layoutTestController.counterValueForElementById('test30')", "'-2147483648'");
-                shouldBe("layoutTestController.counterValueForElementById('test31')", "'0'");
-                shouldBe("layoutTestController.counterValueForElementById('test32')", "'0'");
-                shouldBe("layoutTestController.counterValueForElementById('test33')", "'0'");
-                shouldBe("layoutTestController.counterValueForElementById('test34')", "'30'");
-                shouldBe("layoutTestController.counterValueForElementById('test35')", "'30'");
-                shouldBe("layoutTestController.counterValueForElementById('test36')", "'2147483647'");
-                shouldBe("layoutTestController.counterValueForElementById('test37')", "'2147483647'");
-                shouldBe("layoutTestController.counterValueForElementById('test38')", "'2147483647'");
-                shouldBe("layoutTestController.counterValueForElementById('test39')", "'2147483647'");
-                shouldBe("layoutTestController.counterValueForElementById('test40')", "'32'");
-                shouldBe("layoutTestController.counterValueForElementById('test41')", "'-2147483648'");
-                shouldBe("layoutTestController.counterValueForElementById('test42')", "'-2147483648'");
-                shouldBe("layoutTestController.counterValueForElementById('test43')", "'-2147483648'");
-                shouldBe("layoutTestController.counterValueForElementById('test44')", "'0'");
-                shouldBe("layoutTestController.counterValueForElementById('test45')", "'0'");
-                shouldBe("layoutTestController.counterValueForElementById('test46')", "'0'");
-                shouldBe("layoutTestController.counterValueForElementById('test47')", "'320'");
-                shouldBe("layoutTestController.counterValueForElementById('test48')", "'320'");
-                shouldBe("layoutTestController.counterValueForElementById('test49')", "'2147483647'");
-                shouldBe("layoutTestController.counterValueForElementById('test50')", "'2147483647'");
-                shouldBe("layoutTestController.counterValueForElementById('test51')", "'2147483647'");
-                shouldBe("layoutTestController.counterValueForElementById('test52')", "'2147483647'");
-                shouldBe("layoutTestController.counterValueForElementById('test53')", "'5'");
-                shouldBe("layoutTestController.counterValueForElementById('none53')", "'5'");
-                shouldBe("layoutTestController.counterValueForElementById('test53a')", "'10'");
-                shouldBe("layoutTestController.counterValueForElementById('wrapper54')", "'5'");
-                shouldBe("layoutTestController.counterValueForElementById('test54')", "'10'");
-                shouldBe("layoutTestController.counterValueForElementById('test55')", "'1'");
-                shouldBe("layoutTestController.counterValueForElementById('test56')", "'-2147483648'");
+                shouldBe("window.internals.counterValue(document.getElementById('test3'))", "'-2147483648'");
+                shouldBe("window.internals.counterValue(document.getElementById('test4'))", "'-2147483647'");
+                shouldBe("window.internals.counterValue(document.getElementById('test5'))", "'0'");
+                shouldBe("window.internals.counterValue(document.getElementById('test6'))", "'0'");
+                shouldBe("window.internals.counterValue(document.getElementById('test7'))", "'0'");
+                shouldBe("window.internals.counterValue(document.getElementById('test8'))", "'10'");
+                shouldBe("window.internals.counterValue(document.getElementById('test9'))", "'10'");
+                shouldBe("window.internals.counterValue(document.getElementById('test10'))", "'2147483646'");
+                shouldBe("window.internals.counterValue(document.getElementById('test11'))", "'2147483647'");
+                shouldBe("window.internals.counterValue(document.getElementById('test12'))", "'2147483647'");
+                shouldBe("window.internals.counterValue(document.getElementById('test13'))", "'2147483647'");
+                shouldBe("window.internals.counterValue(document.getElementById('test14'))", "'2'");
+                shouldBe("window.internals.counterValue(document.getElementById('test15'))", "'-2147483648'");
+                shouldBe("window.internals.counterValue(document.getElementById('test16'))", "'-2147483648'");
+                shouldBe("window.internals.counterValue(document.getElementById('test17'))", "'-2147483648'");
+                shouldBe("window.internals.counterValue(document.getElementById('test18'))", "'0'");
+                shouldBe("window.internals.counterValue(document.getElementById('test19'))", "'0'");
+                shouldBe("window.internals.counterValue(document.getElementById('test20'))", "'0'");
+                shouldBe("window.internals.counterValue(document.getElementById('test21'))", "'20'");
+                shouldBe("window.internals.counterValue(document.getElementById('test22'))", "'20'");
+                shouldBe("window.internals.counterValue(document.getElementById('test23'))", "'2147483647'");
+                shouldBe("window.internals.counterValue(document.getElementById('test24'))", "'2147483647'");
+                shouldBe("window.internals.counterValue(document.getElementById('test25'))", "'2147483647'");
+                shouldBe("window.internals.counterValue(document.getElementById('test26'))", "'2147483647'");
+                shouldBe("window.internals.counterValue(document.getElementById('test27'))", "'3'");
+                shouldBe("window.internals.counterValue(document.getElementById('test28'))", "'-2147483648'");
+                shouldBe("window.internals.counterValue(document.getElementById('test29'))", "'-2147483648'");
+                shouldBe("window.internals.counterValue(document.getElementById('test30'))", "'-2147483648'");
+                shouldBe("window.internals.counterValue(document.getElementById('test31'))", "'0'");
+                shouldBe("window.internals.counterValue(document.getElementById('test32'))", "'0'");
+                shouldBe("window.internals.counterValue(document.getElementById('test33'))", "'0'");
+                shouldBe("window.internals.counterValue(document.getElementById('test34'))", "'30'");
+                shouldBe("window.internals.counterValue(document.getElementById('test35'))", "'30'");
+                shouldBe("window.internals.counterValue(document.getElementById('test36'))", "'2147483647'");
+                shouldBe("window.internals.counterValue(document.getElementById('test37'))", "'2147483647'");
+                shouldBe("window.internals.counterValue(document.getElementById('test38'))", "'2147483647'");
+                shouldBe("window.internals.counterValue(document.getElementById('test39'))", "'2147483647'");
+                shouldBe("window.internals.counterValue(document.getElementById('test40'))", "'32'");
+                shouldBe("window.internals.counterValue(document.getElementById('test41'))", "'-2147483648'");
+                shouldBe("window.internals.counterValue(document.getElementById('test42'))", "'-2147483648'");
+                shouldBe("window.internals.counterValue(document.getElementById('test43'))", "'-2147483648'");
+                shouldBe("window.internals.counterValue(document.getElementById('test44'))", "'0'");
+                shouldBe("window.internals.counterValue(document.getElementById('test45'))", "'0'");
+                shouldBe("window.internals.counterValue(document.getElementById('test46'))", "'0'");
+                shouldBe("window.internals.counterValue(document.getElementById('test47'))", "'320'");
+                shouldBe("window.internals.counterValue(document.getElementById('test48'))", "'320'");
+                shouldBe("window.internals.counterValue(document.getElementById('test49'))", "'2147483647'");
+                shouldBe("window.internals.counterValue(document.getElementById('test50'))", "'2147483647'");
+                shouldBe("window.internals.counterValue(document.getElementById('test51'))", "'2147483647'");
+                shouldBe("window.internals.counterValue(document.getElementById('test52'))", "'2147483647'");
+                shouldBe("window.internals.counterValue(document.getElementById('test53'))", "'5'");
+                shouldBe("window.internals.counterValue(document.getElementById('none53'))", "'5'");
+                shouldBe("window.internals.counterValue(document.getElementById('test53a'))", "'10'");
+                shouldBe("window.internals.counterValue(document.getElementById('wrapper54'))", "'5'");
+                shouldBe("window.internals.counterValue(document.getElementById('test54'))", "'10'");
+                shouldBe("window.internals.counterValue(document.getElementById('test55'))", "'1'");
+                shouldBe("window.internals.counterValue(document.getElementById('test56'))", "'-2147483648'");
                 if (window.layoutTestController)
                     layoutTestController.notifyDone();
             }
index d875a30..30cbcf0 100644 (file)
@@ -33,7 +33,7 @@
                 for (i = 0; i < spanList.length; ++i ) {
                     newSpanElement = document.createElement("span");
                     newSpanElement.innerText =
-                    layoutTestController.counterValueForElementById(spanList.item(i).getAttribute("id"));
+                    window.internals.counterValue(document.getElementById(spanList.item(i).getAttribute("id")));
                     if (newSpanElement.innerText.length)
                         newSpanElement.innerText = newSpanElement.innerText + "-"
                     console.appendChild(newSpanElement);
index d5371cc..7bf7b34 100644 (file)
@@ -22,7 +22,7 @@
       if (window.layoutTestController) {
           layoutTestController.dumpAsText();
           // This call ensures the layout happened before we modify the DOM tree.
-          layoutTestController.counterValueForElementById("span1");
+          window.internals.counterValue(document.getElementById("span1"));
       }
 
       var t = document.getElementById("test");
@@ -34,7 +34,7 @@
           spanList = testElement.getElementsByTagName("span");
           for (i = 0; i < spanList.length; ++i ) {
               newSpanElement = document.createElement("span");
-              newSpanElement.innerText = layoutTestController.counterValueForElementById(spanList.item(i).getAttribute("id"));
+              newSpanElement.innerText = window.internals.counterValue(document.getElementById(spanList.item(i).getAttribute("id")));
               if (newSpanElement.innerText.length)
                   newSpanElement.innerText = newSpanElement.innerText + "-";
               console.appendChild(newSpanElement);
index b7ca3f4..3a89c9a 100644 (file)
@@ -30,7 +30,7 @@
                 for (i = 0; i < spanList.length; ++i ) {
                     newSpanElement = document.createElement("span");
                     newSpanElement.innerText =
-                    layoutTestController.counterValueForElementById(spanList.item(i).getAttribute("id"));
+                    window.internals.counterValue(document.getElementById(spanList.item(i).getAttribute("id")));
                     if (newSpanElement.innerText.length)
                         newSpanElement.innerText = newSpanElement.innerText + "-";
                     console.appendChild(newSpanElement);
index 51a23ee..f3bb1f1 100644 (file)
@@ -1,11 +1,11 @@
-This is the test for layoutTestController.counterValueForElementById
+This is the test for window.internals.counterValueForElementById
    
-PASS layoutTestController.counterValueForElementById('before') is '0'
-PASS layoutTestController.counterValueForElementById('after') is '0'
-PASS layoutTestController.counterValueForElementById('before_after') is '0 0'
-PASS layoutTestController.counterValueForElementById('twice') is '0 0'
-PASS layoutTestController.counterValueForElementById('point') is '0.1'
-PASS layoutTestController.counterValueForElementById('two-points') is '0.1.2'
-PASS layoutTestController.counterValueForElementById('greek') is '0.α.β'
-PASS layoutTestController.counterValueForElementById('three-greeks') is '0.α.β 0.α.β 0.α.β'
+PASS window.internals.counterValue(document.getElementById('before')) is '0'
+PASS window.internals.counterValue(document.getElementById('after')) is '0'
+PASS window.internals.counterValue(document.getElementById('before_after')) is '0 0'
+PASS window.internals.counterValue(document.getElementById('twice')) is '0 0'
+PASS window.internals.counterValue(document.getElementById('point')) is '0.1'
+PASS window.internals.counterValue(document.getElementById('two-points')) is '0.1.2'
+PASS window.internals.counterValue(document.getElementById('greek')) is '0.α.β'
+PASS window.internals.counterValue(document.getElementById('three-greeks')) is '0.α.β 0.α.β 0.α.β'
 
index 0197d64..a80a89e 100644 (file)
@@ -14,7 +14,7 @@
     <script src="../../js/resources/js-test-pre.js"></script>
 </head>
 <body>
-    <div>This is the test for layoutTestController.counterValueForElementById</div>
+    <div>This is the test for window.internals.counterValueForElementById</div>
 
     <div class="reset"><span id="before" class="show-before"></span></div>
     <div class="reset"><span id="after" class="show-after"></span></div>
         if (window.layoutTestController) {
             layoutTestController.dumpAsText();
 
-            shouldBe("layoutTestController.counterValueForElementById('before')", "'0'");
-            shouldBe("layoutTestController.counterValueForElementById('after')", "'0'");
-            shouldBe("layoutTestController.counterValueForElementById('before_after')", "'0 0'");
-            shouldBe("layoutTestController.counterValueForElementById('twice')", "'0 0'");
-            shouldBe("layoutTestController.counterValueForElementById('point')", "'0.1'");
-            shouldBe("layoutTestController.counterValueForElementById('two-points')", "'0.1.2'");
-            shouldBe("layoutTestController.counterValueForElementById('greek')", "'0.\u03b1.\u03b2'");
-            shouldBe("layoutTestController.counterValueForElementById('three-greeks')", "'0.\u03b1.\u03b2 0.\u03b1.\u03b2 0.\u03b1.\u03b2'");
+            shouldBe("window.internals.counterValue(document.getElementById('before'))", "'0'");
+            shouldBe("window.internals.counterValue(document.getElementById('after'))", "'0'");
+            shouldBe("window.internals.counterValue(document.getElementById('before_after'))", "'0 0'");
+            shouldBe("window.internals.counterValue(document.getElementById('twice'))", "'0 0'");
+            shouldBe("window.internals.counterValue(document.getElementById('point'))", "'0.1'");
+            shouldBe("window.internals.counterValue(document.getElementById('two-points'))", "'0.1.2'");
+            shouldBe("window.internals.counterValue(document.getElementById('greek'))", "'0.\u03b1.\u03b2'");
+            shouldBe("window.internals.counterValue(document.getElementById('three-greeks'))", "'0.\u03b1.\u03b2 0.\u03b1.\u03b2 0.\u03b1.\u03b2'");
         }
     </script>
 </body>
index 9b5a181..e7f52c9 100644 (file)
@@ -1,4 +1,4 @@
-PASS layoutTestController.counterValueForElementById('div1') is '0'
+PASS window.internals.counterValue(document.getElementById('div1')) is '0'
 
 TEST COMPLETE
 
index 09ce5f0..8ca0cd4 100644 (file)
@@ -26,7 +26,7 @@
   {
       if (!window.layoutTestController)
           return;
-      shouldBe("layoutTestController.counterValueForElementById('div1')", "'0'");
+      shouldBe("window.internals.counterValue(document.getElementById('div1'))", "'0'");
 
       debug('');
       debug('TEST COMPLETE');
index 4f181f8..f97d382 100644 (file)
@@ -22,7 +22,7 @@
         if (window.layoutTestController) {
             layoutTestController.dumpAsText();
             var testResult;
-            var counterValue = layoutTestController.counterValueForElementById("keep-me");
+            var counterValue = window.internals.counterValue(document.getElementById("keep-me"));
             if (counterValue == "1")
                 testResult = "PASS";
             else
index 661d123..91e92fe 100644 (file)
@@ -29,7 +29,7 @@
                 for (i = 0; i < spanList.length; ++i ) {
                     newSpanElement = document.createElement("span");
                     newSpanElement.innerText =
-                    layoutTestController.counterValueForElementById(spanList.item(i).getAttribute("id"));
+                    window.internals.counterValue(document.getElementById(spanList.item(i).getAttribute("id")));
                     if (newSpanElement.innerText.length)
                         newSpanElement.innerText = newSpanElement.innerText + "- ";
                     console.appendChild(newSpanElement);
index 286a615..b7c360c 100644 (file)
@@ -1,3 +1,22 @@
+2012-06-11  Kaustubh Atrawalkar  <kaustubh@motorola.com>
+
+        [DRT] LTC:: counterValueForElementById() could be moved to Internals.
+        https://bugs.webkit.org/show_bug.cgi?id=84406
+
+        Reviewed by Hajime Morita.
+
+        Move the counterValueForElementById from LayoutTestCotroller to Internals and
+        remove the old platform specific implementations as it exclusively tests WebCore functionality.
+
+        Covered by existing test cases.
+
+        * testing/Internals.cpp:
+        (WebCore::Internals::counterValue):
+        (WebCore):
+        * testing/Internals.h:
+        (Internals):
+        * testing/Internals.idl:
+
 2012-06-11  Hans Wennborg  <hans@chromium.org>
 
         Speech JavaScript API: Make SpeechRecognitionError an Event
index cfd0907..b3168ed 100644 (file)
@@ -1058,6 +1058,14 @@ void Internals::allowRoundingHacks() const
     TextRun::setAllowsRoundingHacks(true);
 }
 
+String Internals::counterValue(Element* element)
+{
+    if (!element)
+        return String();
+
+    return counterValueForElement(element);
+}
+
 #if ENABLE(FULLSCREEN_API)
 void Internals::webkitWillEnterFullScreenForElement(Document* document, Element* element)
 {
index 6fa4a45..806e70e 100644 (file)
@@ -176,6 +176,8 @@ public:
     Vector<String> consoleMessageArgumentCounts(Document*) const;
 #endif
 
+    String counterValue(Element*);
+
 #if ENABLE(FULLSCREEN_API)
     void webkitWillEnterFullScreenForElement(Document*, Element*);
     void webkitDidEnterFullScreenForElement(Document*, Element*);
index aa10858..a4490fa 100644 (file)
@@ -151,6 +151,8 @@ module window {
         [Conditional=INSPECTOR] unsigned long numberOfLiveDocuments();
         [Conditional=INSPECTOR] sequence<String> consoleMessageArgumentCounts(in Document document);
 
+        DOMString counterValue(in Element element);
+
 #if defined(ENABLE_FULLSCREEN_API) && ENABLE_FULLSCREEN_API
         void webkitWillEnterFullScreenForElement(in Document document, in Element element);
         void webkitDidEnterFullScreenForElement(in Document document, in Element element);
index 897010e..68c9dec 100644 (file)
@@ -1,3 +1,15 @@
+2012-06-11  Kaustubh Atrawalkar  <kaustubh@motorola.com>
+
+        [DRT] LTC:: counterValueForElementById() could be moved to Internals.
+        https://bugs.webkit.org/show_bug.cgi?id=84406
+
+        Reviewed by Hajime Morita.
+
+        Move the counterValueForElementById from LayoutTestCotroller to Internals and
+        remove the old platform specific implementations as it exclusively tests WebCore functionality.
+
+        * WebCoreSupport/DumpRenderTreeSupportEfl.cpp:
+
 2012-06-05  Adam Barth  <abarth@webkit.org>
 
         Remove support for target-densitydpi in the viewport meta tag
index b45aef1..6ce5021 100644 (file)
@@ -97,21 +97,6 @@ void DumpRenderTreeSupportEfl::clearOpener(Evas_Object* ewkFrame)
         frame->loader()->setOpener(0);
 }
 
-String DumpRenderTreeSupportEfl::counterValueByElementId(const Evas_Object* ewkFrame, const char* elementId)
-{
-    WebCore::Frame* frame = EWKPrivate::coreFrame(ewkFrame);
-
-    if (!frame)
-        return String();
-
-    WebCore::Element* element = frame->document()->getElementById(elementId);
-
-    if (!element)
-        return String();
-
-    return WebCore::counterValueForElement(element);
-}
-
 bool DumpRenderTreeSupportEfl::elementDoesAutoCompleteForElementWithId(const Evas_Object* ewkFrame, const String& elementId)
 {
     WebCore::Frame* frame = EWKPrivate::coreFrame(ewkFrame);
index 00dfefc..cb58432 100644 (file)
@@ -1,3 +1,17 @@
+2012-06-11  Kaustubh Atrawalkar  <kaustubh@motorola.com>
+
+        [DRT] LTC:: counterValueForElementById() could be moved to Internals.
+        https://bugs.webkit.org/show_bug.cgi?id=84406
+
+        Reviewed by Hajime Morita.
+
+        Move the counterValueForElementById from LayoutTestCotroller to Internals and
+        remove the old platform specific implementations as it exclusively tests WebCore functionality.
+
+        * WebCoreSupport/DumpRenderTreeSupportGtk.cpp:
+        * WebCoreSupport/DumpRenderTreeSupportGtk.h:
+        (DumpRenderTreeSupportGtk):
+
 2012-06-07  Simon Pena  <spena@igalia.com>
 
         [GTK] deviceScaleFactor setting is not honored
index 3dd6b4d..e58b924 100644 (file)
@@ -189,28 +189,6 @@ CString DumpRenderTreeSupportGtk::dumpRenderTree(WebKitWebFrame* frame)
 }
 
 /**
- * counterValueForElementById:
- * @frame: a #WebKitWebFrame
- * @id: an element ID string
- *
- * Return value: The counter value of element @id in @frame
- */
-CString DumpRenderTreeSupportGtk::counterValueForElementById(WebKitWebFrame* frame, const char* id)
-{
-    g_return_val_if_fail(WEBKIT_IS_WEB_FRAME(frame), CString());
-
-    Frame* coreFrame = core(frame);
-    if (!coreFrame)
-        return CString();
-
-    Element* coreElement = coreFrame->document()->getElementById(AtomicString(id));
-    if (!coreElement)
-        return CString();
-
-    return counterValueForElement(coreElement).utf8();
-}
-
-/**
  * numberForElementById
  * @frame: a #WebKitWebFrame
  * @id: an element ID string
index 34f7bde..7165182 100644 (file)
@@ -61,7 +61,6 @@ public:
     static GSList* getFrameChildren(WebKitWebFrame*);
     static WTF::CString getInnerText(WebKitWebFrame*);
     static WTF::CString dumpRenderTree(WebKitWebFrame*);
-    static WTF::CString counterValueForElementById(WebKitWebFrame*, const char* id);
     static int pageNumberForElementById(WebKitWebFrame*, const char* id, float pageWidth, float pageHeight);
     static int numberOfPagesForFrame(WebKitWebFrame*, float pageWidth, float pageHeight);
     static WTF::CString pageProperty(WebKitWebFrame*, const char* propertyName, int pageNumber);
index 2f8ac6f..ce2a899 100644 (file)
@@ -1,3 +1,16 @@
+2012-06-11  Kaustubh Atrawalkar  <kaustubh@motorola.com>
+
+        [DRT] LTC:: counterValueForElementById() could be moved to Internals.
+        https://bugs.webkit.org/show_bug.cgi?id=84406
+
+        Reviewed by Hajime Morita.
+
+        Move the counterValueForElementById from LayoutTestCotroller to Internals and
+        remove the old platform specific implementations as it exclusively tests WebCore functionality.
+
+        * WebCoreSupport/DumpRenderTreeSupportQt.cpp:
+        * WebCoreSupport/DumpRenderTreeSupportQt.h:
+
 2012-06-11  Csaba Osztrogonác  <ossy@webkit.org>
 
         [Qt][Win] Add missing includes to fix the build
index 70dd5fb..a094a25 100644 (file)
@@ -406,17 +406,6 @@ void DumpRenderTreeSupportQt::garbageCollectorCollectOnAlternateThread(bool wait
 #endif
 }
 
-// Returns the value of counter in the element specified by \a id.
-QString DumpRenderTreeSupportQt::counterValueForElementById(QWebFrame* frame, const QString& id)
-{
-    Frame* coreFrame = QWebFramePrivate::core(frame);
-    if (Document* document = coreFrame->document()) {
-        if (Element* element = document->getElementById(id))
-            return WebCore::counterValueForElement(element);
-    }
-    return QString();
-}
-
 int DumpRenderTreeSupportQt::pageNumberForElementById(QWebFrame* frame, const QString& id, float width, float height)
 {
     Frame* coreFrame = QWebFramePrivate::core(frame);
index 41800fa..1762900 100644 (file)
@@ -135,7 +135,6 @@ public:
     static void webInspectorClose(QWebPage* page);
 
     static QString webPageGroupName(QWebPage *page);
-    static QString counterValueForElementById(QWebFrame* frame, const QString& id);
     static void webPageSetGroupName(QWebPage* page, const QString& groupName);
     static void clearFrameName(QWebFrame* frame);
     static void overwritePluginDirectories();
index 1b68664..bbbdb75 100644 (file)
@@ -1,3 +1,17 @@
+2012-06-11  Kaustubh Atrawalkar  <kaustubh@motorola.com>
+
+        [DRT] LTC:: counterValueForElementById() could be moved to Internals.
+        https://bugs.webkit.org/show_bug.cgi?id=84406
+
+        Reviewed by Hajime Morita.
+
+        Move the counterValueForElementById from LayoutTestCotroller to Internals and
+        remove the old platform specific implementations as it exclusively tests WebCore functionality.
+
+        * Interfaces/IWebFramePrivate.idl:
+        * WebFrame.cpp:
+        * WebFrame.h:
+
 2012-06-11  Sam Weinig  <sam@webkit.org>
 
         Remove support for disconnected/excluded from search frames, they are not used by Safari anymore
index dea1123..146c300 100644 (file)
@@ -96,8 +96,6 @@ interface IWebFramePrivate : IUnknown
 
     [local] JSGlobalContextRef globalContextForScriptWorld([in] IWebScriptWorld*);
 
-    HRESULT counterValueForElementById([in] BSTR id, [out, retval] BSTR* result);
-
     HRESULT visibleContentRect([out, retval] RECT*);
 
     HRESULT pageNumberForElementById([in] BSTR id, [in] float pageWidthInPixels, [in] float pageHeightInPixels, [out, retval] int* pageNumber);
index 8732da8..27d24f2 100644 (file)
@@ -878,25 +878,6 @@ HRESULT WebFrame::renderTreeAsExternalRepresentation(BOOL forPrinting, BSTR *res
     return S_OK;
 }
 
-HRESULT STDMETHODCALLTYPE WebFrame::counterValueForElementById(
-    /* [in] */ BSTR id, /* [retval][out] */ BSTR *result)
-{
-    if (!result)
-        return E_POINTER;
-
-    Frame* coreFrame = core(this);
-    if (!coreFrame)
-        return E_FAIL;
-
-    String coreId = String(id, SysStringLen(id));
-
-    Element* element = coreFrame->document()->getElementById(coreId);
-    if (!element)
-        return E_FAIL;
-    *result = BString(counterValueForElement(element)).release();
-    return S_OK;
-}
-
 HRESULT STDMETHODCALLTYPE WebFrame::pageNumberForElementById(
     /* [in] */ BSTR id,
     /* [in] */ float pageWidthInPixels,
index b63438b..c2fbe36 100644 (file)
@@ -163,10 +163,6 @@ public:
     virtual HRESULT STDMETHODCALLTYPE unused1(BSTR*) { return E_NOTIMPL; }
     virtual HRESULT STDMETHODCALLTYPE renderTreeAsExternalRepresentation(BOOL forPrinting, BSTR *result);
 
-    virtual HRESULT STDMETHODCALLTYPE counterValueForElementById(
-        /* [in] */ BSTR id,
-        /* [retval][out] */ BSTR *result);
-
     virtual HRESULT STDMETHODCALLTYPE pageNumberForElementById(
         /* [in] */ BSTR id,
         /* [in] */ float pageWidthInPixels,
index 4b5129c..0829a58 100644 (file)
@@ -1,3 +1,14 @@
+2012-06-11  Kaustubh Atrawalkar  <kaustubh@motorola.com>
+
+        [DRT] LTC:: counterValueForElementById() could be moved to Internals.
+        https://bugs.webkit.org/show_bug.cgi?id=84406
+
+        Reviewed by Hajime Morita.
+
+        Exporting Internals::counterValueForElement symbols for the win build.
+
+        * win/WebKit2.def:
+
 2012-06-11  Ryuan Choi  <ryuan.choi@samsung.com>
 
         [CMAKE][WK2] Make WebProcess target name more clear.
index 4a74d5a..1983e6c 100644 (file)
@@ -117,6 +117,7 @@ EXPORTS
         ?callOnMainThread@WTF@@YAXP6AXPAX@Z0@Z
         ?consoleMessageArgumentCounts@InspectorConsoleAgent@WebCore@@QAE?AV?$Vector@I$0A@@WTF@@XZ
         ?counterValue@InspectorCounters@WebCore@@SAHW4CounterType@12@@Z
+        ?counterValueForElement@WebCore@@YA?AVString@WTF@@PAVElement@1@@Z
         ?createThread@WTF@@YAIP6APAXPAX@Z0PBD@Z
         ?createThread@WTF@@YAIP6AXPAX@Z0PBD@Z
         ?currentThread@WTF@@YAIXZ
index 6a8d07f..4cb8a99 100644 (file)
@@ -106,6 +106,7 @@ _ZNK7WebCore8Document8settingsEv;
 _ZNK7WebCore8Document4viewEv;
 _ZNK7WebCore5Range4textEv;
 _ZNK7WebCore9TreeScope14getElementByIdERKN3WTF12AtomicStringE;
+_ZN7WebCore22counterValueForElementEPNS_7ElementE;
 _ZNK7WebCore14DocumentMarker11descriptionEv;
 _ZN7WebCore8Document16isPageBoxVisibleEi;
 _ZN7WebCore19AnimationController17suspendAnimationsEv;
index 9b0efa3..81065ff 100644 (file)
@@ -1,3 +1,37 @@
+2012-06-11  Kaustubh Atrawalkar  <kaustubh@motorola.com>
+
+        [DRT] LTC:: counterValueForElementById() could be moved to Internals.
+        https://bugs.webkit.org/show_bug.cgi?id=84406
+
+        Reviewed by Hajime Morita.
+
+        Move the counterValueForElementById from LayoutTestCotroller to Internals and
+        remove the old platform specific implementations as it exclusively tests WebCore functionality.
+
+        * DumpRenderTree/LayoutTestController.cpp:
+        (LayoutTestController::staticFunctions):
+        * DumpRenderTree/LayoutTestController.h:
+        (LayoutTestController):
+        * DumpRenderTree/blackberry/LayoutTestControllerBlackBerry.cpp:
+        * DumpRenderTree/chromium/LayoutTestController.cpp:
+        (LayoutTestController::LayoutTestController):
+        (LayoutTestController::setPOSIXLocale):
+        * DumpRenderTree/chromium/LayoutTestController.h:
+        (LayoutTestController):
+        * DumpRenderTree/efl/LayoutTestControllerEfl.cpp:
+        * DumpRenderTree/gtk/LayoutTestControllerGtk.cpp:
+        * DumpRenderTree/mac/LayoutTestControllerMac.mm:
+        * DumpRenderTree/qt/LayoutTestControllerQt.cpp:
+        * DumpRenderTree/qt/LayoutTestControllerQt.h:
+        (LayoutTestController):
+        * DumpRenderTree/win/LayoutTestControllerWin.cpp:
+        * DumpRenderTree/wx/LayoutTestControllerWx.cpp:
+        * WebKitTestRunner/InjectedBundle/Bindings/LayoutTestController.idl:
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.cpp:
+        (WTR):
+        * WebKitTestRunner/InjectedBundle/LayoutTestController.h:
+        (LayoutTestController):
+
 2012-06-11  Hans Wennborg  <hans@chromium.org>
 
         Speech JavaScript API: Make SpeechRecognitionError an Event
index 440d0dc..6efb456 100644 (file)
@@ -662,22 +662,6 @@ static JSValueRef findStringCallback(JSContextRef context, JSObjectRef function,
     return JSValueMakeBoolean(context, controller->findString(context, target.get(), options));
 }
 
-static JSValueRef counterValueForElementByIdCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
-{
-    if (argumentCount < 1)
-        return JSValueMakeUndefined(context);
-
-    JSRetainPtr<JSStringRef> elementId(Adopt, JSValueToStringCopy(context, arguments[0], exception));
-    if (*exception)
-        return JSValueMakeUndefined(context);
-
-    LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
-    JSRetainPtr<JSStringRef> counterValue(controller->counterValueForElementById(elementId.get()));
-    if (!counterValue.get())
-        return JSValueMakeUndefined(context);
-    return JSValueMakeString(context, counterValue.get());
-}
-
 static JSValueRef goBackCallback(JSContextRef context, JSObjectRef function, JSObjectRef thisObject, size_t argumentCount, const JSValueRef arguments[], JSValueRef* exception)
 {
     LayoutTestController* controller = static_cast<LayoutTestController*>(JSObjectGetPrivate(thisObject));
@@ -2335,7 +2319,6 @@ JSStaticFunction* LayoutTestController::staticFunctions()
         { "evaluateScriptInIsolatedWorld", evaluateScriptInIsolatedWorldCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "execCommand", execCommandCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "findString", findStringCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
-        { "counterValueForElementById", counterValueForElementByIdCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "originsWithApplicationCache", originsWithApplicationCacheCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete },
         { "goBack", goBackCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 
         { "grantDesktopNotificationPermission", grantDesktopNotificationPermissionCallback, kJSPropertyAttributeReadOnly | kJSPropertyAttributeDontDelete }, 
index 640d1c1..8233617 100644 (file)
@@ -56,7 +56,6 @@ public:
     bool callShouldCloseOnWebView();
     JSStringRef copyDecodedHostName(JSStringRef name);
     JSStringRef copyEncodedHostName(JSStringRef name);
-    JSRetainPtr<JSStringRef> counterValueForElementById(JSStringRef id);
     void deliverWebIntent(JSStringRef action, JSStringRef type, JSStringRef data);
     void disableImageLoading();
     void dispatchPendingLoadRequests();
index 4f043d9..ceadb7a 100644 (file)
@@ -429,21 +429,6 @@ void LayoutTestController::disableImageLoading()
     BlackBerry::WebKit::DumpRenderTree::currentInstance()->page()->settings()->setLoadsImagesAutomatically(false);
 }
 
-JSRetainPtr<JSStringRef> LayoutTestController::counterValueForElementById(JSStringRef id)
-{
-    String idStr = jsStringRefToWebCoreString(id);
-    WebCore::Element* coreElement = mainFrame->document()->getElementById(AtomicString(idStr));
-    if (!coreElement)
-        return 0;
-
-    CString counterValueStr = counterValueForElement(coreElement).utf8();
-    if (counterValueStr.isNull())
-        return 0;
-
-    JSRetainPtr<JSStringRef> counterValue(Adopt, JSStringCreateWithUTF8CString(counterValueStr.data()));
-    return counterValue;
-}
-
 void LayoutTestController::overridePreference(JSStringRef key, JSStringRef value)
 {
     if (!mainFrame)
index e2c446a..9299e2f 100644 (file)
@@ -125,7 +125,6 @@ LayoutTestController::LayoutTestController(TestShell* shell)
     bindMethod("addUserStyleSheet", &LayoutTestController::addUserStyleSheet);
     bindMethod("clearAllDatabases", &LayoutTestController::clearAllDatabases);
     bindMethod("closeWebInspector", &LayoutTestController::closeWebInspector);
-    bindMethod("counterValueForElementById", &LayoutTestController::counterValueForElementById);
 #if ENABLE(POINTER_LOCK)
     bindMethod("didLosePointerLock", &LayoutTestController::didLosePointerLock);
 #endif
@@ -1659,20 +1658,6 @@ void LayoutTestController::setPOSIXLocale(const CppArgumentList& arguments, CppV
         setlocale(LC_ALL, arguments[0].toString().c_str());
 }
 
-void LayoutTestController::counterValueForElementById(const CppArgumentList& arguments, CppVariant* result)
-{
-    result->setNull();
-    if (arguments.size() < 1 || !arguments[0].isString())
-        return;
-    WebFrame* frame = m_shell->webView()->mainFrame();
-    if (!frame)
-        return;
-    WebString counterValue = frame->counterValueForElementById(cppVariantToWebString(arguments[0]));
-    if (counterValue.isNull())
-        return;
-    result->set(counterValue.utf8());
-}
-
 // Parse a single argument. The method returns true if there is an argument that
 // is a number or if there is no argument at all. It returns false only if there
 // is some argument that is not a number. The value parameter is filled with the
index 32c1f51..5a87293 100644 (file)
@@ -324,9 +324,6 @@ public:
     // Resets between tests.
     void setPOSIXLocale(const CppArgumentList&, CppVariant*);
 
-    // Gets the value of the counter in the element specified by its ID.
-    void counterValueForElementById(const CppArgumentList&, CppVariant*);
-
     // Causes layout to happen as if targetted to printed pages.
     void setPrinting(const CppArgumentList&, CppVariant*);
 
index 2c1710b..419a246 100644 (file)
@@ -107,13 +107,6 @@ void LayoutTestController::display()
     displayWebView();
 }
 
-JSRetainPtr<JSStringRef> LayoutTestController::counterValueForElementById(JSStringRef id)
-{
-    const Evas_Object* mainFrame = browser->mainFrame();
-    const String counterValue(DumpRenderTreeSupportEfl::counterValueByElementId(mainFrame, id->ustring().utf8().data()));
-    return JSRetainPtr<JSStringRef>(Adopt, JSStringCreateWithUTF8CString(counterValue.utf8().data()));
-}
-
 void LayoutTestController::keepWebHistory()
 {
     notImplemented();
index 275c2e0..72d69fa 100644 (file)
@@ -102,17 +102,6 @@ void LayoutTestController::display()
     displayWebView();
 }
 
-JSRetainPtr<JSStringRef> LayoutTestController::counterValueForElementById(JSStringRef id)
-{
-    gchar* idGChar = JSStringCopyUTF8CString(id);
-    CString counterValueGChar = DumpRenderTreeSupportGtk::counterValueForElementById(mainFrame, idGChar);
-    g_free(idGChar);
-    if (counterValueGChar.isNull())
-        return 0;
-    JSRetainPtr<JSStringRef> counterValue(Adopt, JSStringCreateWithUTF8CString(counterValueGChar.data()));
-    return counterValue;
-}
-
 void LayoutTestController::keepWebHistory()
 {
     // FIXME: implement
index 72c0cea..884572e 100644 (file)
@@ -249,19 +249,6 @@ void LayoutTestController::display()
     displayWebView();
 }
 
-JSRetainPtr<JSStringRef> LayoutTestController::counterValueForElementById(JSStringRef id)
-{
-    RetainPtr<CFStringRef> idCF(AdoptCF, JSStringCopyCFString(kCFAllocatorDefault, id));
-    NSString *idNS = (NSString *)idCF.get();
-
-    DOMElement *element = [[mainFrame DOMDocument] getElementById:idNS];
-    if (!element)
-        return 0;
-
-    JSRetainPtr<JSStringRef> counterValue(Adopt, JSStringCreateWithCFString((CFStringRef)[mainFrame counterValueForElement:element]));
-    return counterValue;
-}
-
 void LayoutTestController::keepWebHistory()
 {
     if (![WebHistory optionalSharedHistory]) {
index 9bbf439..7689d5b 100644 (file)
@@ -155,11 +155,6 @@ void LayoutTestController::waitUntilDone()
     m_timeoutTimer.start(m_timeout, this);
 }
 
-QString LayoutTestController::counterValueForElementById(const QString& id)
-{
-    return DumpRenderTreeSupportQt::counterValueForElementById(m_drt->webPage()->mainFrame(), id);
-}
-
 void LayoutTestController::setViewModeMediaFeature(const QString& mode)
 {
     m_drt->webPage()->setProperty("_q_viewMode", mode);
index ef68b36..88b57cf 100644 (file)
@@ -105,7 +105,6 @@ public slots:
     void setCanOpenWindows() { m_canOpenWindows = true; }
     void setPrinting() { m_isPrinting = true; }
     void waitUntilDone();
-    QString counterValueForElementById(const QString& id);
     int webHistoryItemCount();
     void keepWebHistory();
     void notifyDone();
index 1239449..9d03abc 100644 (file)
@@ -1300,25 +1300,6 @@ void LayoutTestController::removeAllVisitedLinks()
     sharedHistoryPrivate->removeAllVisitedLinks();
 }
 
-JSRetainPtr<JSStringRef> LayoutTestController::counterValueForElementById(JSStringRef id)
-{
-    COMPtr<IWebFramePrivate> framePrivate(Query, frame);
-    if (!framePrivate)
-        return 0;
-
-    wstring idWstring = jsStringRefToWString(id);
-    BSTR idBSTR = SysAllocStringLen((OLECHAR*)idWstring.c_str(), idWstring.length());
-    BSTR counterValueBSTR;
-    if (FAILED(framePrivate->counterValueForElementById(idBSTR, &counterValueBSTR)))
-        return 0;
-
-    wstring counterValue(counterValueBSTR, SysStringLen(counterValueBSTR));
-    SysFreeString(idBSTR);
-    SysFreeString(counterValueBSTR);
-    JSRetainPtr<JSStringRef> counterValueJS(Adopt, JSStringCreateWithCharacters(counterValue.data(), counterValue.length()));
-    return counterValueJS;
-}
-
 int LayoutTestController::pageNumberForElementById(JSStringRef id, float pageWidthInPixels, float pageHeightInPixels)
 {
     COMPtr<IWebFramePrivate> framePrivate(Query, frame);
index 08d2832..e0c0584 100644 (file)
@@ -472,11 +472,6 @@ void LayoutTestController::setScrollbarPolicy(JSStringRef orientation, JSStringR
     // FIXME: implement
 }
 
-JSRetainPtr<JSStringRef> LayoutTestController::counterValueForElementById(JSStringRef id)
-{
-    return 0;
-}
-
 int LayoutTestController::pageNumberForElementById(JSStringRef, float, float)
 {
     // FIXME: implement
index 819ea46..b5766c0 100644 (file)
@@ -66,7 +66,6 @@ module WTR {
         // Special DOM functions.
         void clearBackForwardList();
         object computedStyleIncludingVisitedInfo(in object element);
-        DOMString counterValueForElementById(in DOMString elementId);
         void execCommand(in DOMString name, in DOMString argument);
         boolean isCommandEnabled(in DOMString name);
         DOMString markerTextForListItem(in object element);
index 2c2e68c..f34ce1d 100644 (file)
@@ -254,16 +254,6 @@ JSValueRef LayoutTestController::computedStyleIncludingVisitedInfo(JSValueRef el
     return value;
 }
 
-JSRetainPtr<JSStringRef> LayoutTestController::counterValueForElementById(JSStringRef elementId)
-{
-    WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
-    JSObjectRef element = getElementById(mainFrame, elementId);
-    if (!element)
-        return 0;
-    WKRetainPtr<WKStringRef> value(AdoptWK, WKBundleFrameCopyCounterValue(mainFrame, const_cast<JSObjectRef>(element)));
-    return toJS(value);
-}
-
 JSRetainPtr<JSStringRef> LayoutTestController::markerTextForListItem(JSValueRef element)
 {
     WKBundleFrameRef mainFrame = WKBundlePageGetMainFrame(InjectedBundle::shared().page()->page());
index 945a660..c0500f7 100644 (file)
@@ -100,7 +100,6 @@ public:
 
     // Special DOM functions.
     JSValueRef computedStyleIncludingVisitedInfo(JSValueRef element);
-    JSRetainPtr<JSStringRef> counterValueForElementById(JSStringRef elementId);
     void clearBackForwardList();
     void execCommand(JSStringRef name, JSStringRef argument);
     bool isCommandEnabled(JSStringRef name);