Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(292)

Unified Diff: third_party/WebKit/Source/web/tests/sim/SimTest.cpp

Issue 2521043003: Replace LayoutTests/paint/invalidation/text-selection-focus.html with a SimTest. (Closed)
Patch Set: copyrights. Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/web/tests/sim/SimTest.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/web/tests/sim/SimTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/sim/SimTest.cpp b/third_party/WebKit/Source/web/tests/sim/SimTest.cpp
index 476be18f861361564c7d0c1aa4f0d289e7217443..a3e01fe09faf235281df41b91589a4483b7dec63 100644
--- a/third_party/WebKit/Source/web/tests/sim/SimTest.cpp
+++ b/third_party/WebKit/Source/web/tests/sim/SimTest.cpp
@@ -5,6 +5,7 @@
#include "web/tests/sim/SimTest.h"
#include "core/dom/Document.h"
+#include "core/frame/LocalDOMWindow.h"
#include "platform/LayoutTestSupport.h"
#include "platform/scroll/ScrollbarTheme.h"
#include "platform/testing/UnitTestHelpers.h"
@@ -26,6 +27,7 @@ SimTest::SimTest() : m_webViewClient(m_compositor) {
ScrollbarTheme::setMockScrollbarsEnabled(true);
m_webViewHelper.initialize(true, nullptr, &m_webViewClient);
m_compositor.setWebViewImpl(webView());
+ m_page.setPage(webView().page());
}
SimTest::~SimTest() {
@@ -43,6 +45,14 @@ void SimTest::loadURL(const String& url) {
webView().mainFrameImpl()->loadRequest(request);
}
+LocalDOMWindow& SimTest::window() {
ojan 2016/11/22 00:46:27 This really makes me want a WebModules thing or so
+ return *document().domWindow();
+}
+
+SimPage& SimTest::page() {
+ return m_page;
+}
+
Document& SimTest::document() {
return *webView().mainFrameImpl()->frame()->document();
}
« no previous file with comments | « third_party/WebKit/Source/web/tests/sim/SimTest.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698