| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
| 3 * Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org) | 3 * Copyright (C) 2010 Pawel Hajdan (phajdan.jr@chromium.org) |
| 4 * Copyright (C) 2012 Apple Inc. All Rights Reserved. | 4 * Copyright (C) 2012 Apple Inc. All Rights Reserved. |
| 5 * | 5 * |
| 6 * Redistribution and use in source and binary forms, with or without | 6 * Redistribution and use in source and binary forms, with or without |
| 7 * modification, are permitted provided that the following conditions are | 7 * modification, are permitted provided that the following conditions are |
| 8 * met: | 8 * met: |
| 9 * | 9 * |
| 10 * * Redistributions of source code must retain the above copyright | 10 * * Redistributions of source code must retain the above copyright |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 292 bindMethod("display", &TestRunner::display); | 292 bindMethod("display", &TestRunner::display); |
| 293 bindMethod("displayInvalidatedRegion", &TestRunner::displayInvalidatedRegion
); | 293 bindMethod("displayInvalidatedRegion", &TestRunner::displayInvalidatedRegion
); |
| 294 bindMethod("isChooserShown", &TestRunner::isChooserShown); | 294 bindMethod("isChooserShown", &TestRunner::isChooserShown); |
| 295 | 295 |
| 296 // The following modify WebPageOverlays. | 296 // The following modify WebPageOverlays. |
| 297 bindMethod("addWebPageOverlay", &TestRunner::addWebPageOverlay); | 297 bindMethod("addWebPageOverlay", &TestRunner::addWebPageOverlay); |
| 298 bindMethod("removeWebPageOverlay", &TestRunner::removeWebPageOverlay); | 298 bindMethod("removeWebPageOverlay", &TestRunner::removeWebPageOverlay); |
| 299 | 299 |
| 300 // Properties. | 300 // Properties. |
| 301 bindProperty("globalFlag", &m_globalFlag); | 301 bindProperty("globalFlag", &m_globalFlag); |
| 302 bindProperty("titleTextDirection", &m_titleTextDirection); | |
| 303 bindProperty("platformName", &m_platformName); | 302 bindProperty("platformName", &m_platformName); |
| 304 bindProperty("tooltipText", &m_tooltipText); | 303 bindProperty("tooltipText", &m_tooltipText); |
| 305 bindProperty("disableNotifyDone", &m_disableNotifyDone); | 304 bindProperty("disableNotifyDone", &m_disableNotifyDone); |
| 306 | 305 |
| 307 // webHistoryItemCount is used by tests in LayoutTests\http\tests\history | 306 // webHistoryItemCount is used by tests in LayoutTests\http\tests\history |
| 308 bindProperty("webHistoryItemCount", &m_webHistoryItemCount); | 307 bindProperty("webHistoryItemCount", &m_webHistoryItemCount); |
| 309 bindProperty("interceptPostMessage", &m_interceptPostMessage); | 308 bindProperty("interceptPostMessage", &m_interceptPostMessage); |
| 310 | 309 |
| 311 // The following are stubs. | 310 // The following are stubs. |
| 312 bindMethod("dumpDatabaseCallbacks", &TestRunner::notImplemented); | 311 bindMethod("dumpDatabaseCallbacks", &TestRunner::notImplemented); |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 420 m_dumpSelectionRect = false; | 419 m_dumpSelectionRect = false; |
| 421 m_testRepaint = false; | 420 m_testRepaint = false; |
| 422 m_sweepHorizontally = false; | 421 m_sweepHorizontally = false; |
| 423 m_isPrinting = false; | 422 m_isPrinting = false; |
| 424 m_shouldStayOnPageAfterHandlingBeforeUnload = false; | 423 m_shouldStayOnPageAfterHandlingBeforeUnload = false; |
| 425 m_shouldDumpResourcePriorities = false; | 424 m_shouldDumpResourcePriorities = false; |
| 426 | 425 |
| 427 m_httpHeadersToClear.clear(); | 426 m_httpHeadersToClear.clear(); |
| 428 | 427 |
| 429 m_globalFlag.set(false); | 428 m_globalFlag.set(false); |
| 430 m_titleTextDirection.set("ltr"); | |
| 431 m_webHistoryItemCount.set(0); | 429 m_webHistoryItemCount.set(0); |
| 432 m_interceptPostMessage.set(false); | 430 m_interceptPostMessage.set(false); |
| 433 m_platformName.set("chromium"); | 431 m_platformName.set("chromium"); |
| 434 m_tooltipText.set(""); | 432 m_tooltipText.set(""); |
| 435 m_disableNotifyDone.set(false); | 433 m_disableNotifyDone.set(false); |
| 436 | 434 |
| 437 m_userStyleSheetLocation = WebURL(); | 435 m_userStyleSheetLocation = WebURL(); |
| 438 | 436 |
| 439 m_webPermissions->reset(); | 437 m_webPermissions->reset(); |
| 440 | 438 |
| (...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 622 bool TestRunner::isPrinting() const | 620 bool TestRunner::isPrinting() const |
| 623 { | 621 { |
| 624 return m_isPrinting; | 622 return m_isPrinting; |
| 625 } | 623 } |
| 626 | 624 |
| 627 bool TestRunner::shouldStayOnPageAfterHandlingBeforeUnload() const | 625 bool TestRunner::shouldStayOnPageAfterHandlingBeforeUnload() const |
| 628 { | 626 { |
| 629 return m_shouldStayOnPageAfterHandlingBeforeUnload; | 627 return m_shouldStayOnPageAfterHandlingBeforeUnload; |
| 630 } | 628 } |
| 631 | 629 |
| 632 void TestRunner::setTitleTextDirection(WebKit::WebTextDirection dir) | |
| 633 { | |
| 634 m_titleTextDirection.set(dir == WebKit::WebTextDirectionLeftToRight ? "ltr"
: "rtl"); | |
| 635 } | |
| 636 | |
| 637 const std::set<std::string>* TestRunner::httpHeadersToClear() const | 630 const std::set<std::string>* TestRunner::httpHeadersToClear() const |
| 638 { | 631 { |
| 639 return &m_httpHeadersToClear; | 632 return &m_httpHeadersToClear; |
| 640 } | 633 } |
| 641 | 634 |
| 642 void TestRunner::setTopLoadingFrame(WebFrame* frame, bool clear) | 635 void TestRunner::setTopLoadingFrame(WebFrame* frame, bool clear) |
| 643 { | 636 { |
| 644 if (frame->top()->view() != m_webView) | 637 if (frame->top()->view() != m_webView) |
| 645 return; | 638 return; |
| 646 if (!m_testIsRunning) | 639 if (!m_testIsRunning) |
| (...skipping 1481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2128 result->setNull(); | 2121 result->setNull(); |
| 2129 } | 2122 } |
| 2130 | 2123 |
| 2131 void TestRunner::setPointerLockWillFailSynchronously(const CppArgumentList&, Cpp
Variant* result) | 2124 void TestRunner::setPointerLockWillFailSynchronously(const CppArgumentList&, Cpp
Variant* result) |
| 2132 { | 2125 { |
| 2133 m_pointerLockPlannedResult = PointerLockWillFailSync; | 2126 m_pointerLockPlannedResult = PointerLockWillFailSync; |
| 2134 result->setNull(); | 2127 result->setNull(); |
| 2135 } | 2128 } |
| 2136 | 2129 |
| 2137 } | 2130 } |
| OLD | NEW |