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

Side by Side Diff: third_party/WebKit/Source/web/tests/sim/SimTest.h

Issue 2732483004: Reinitialize WindowProxy on navigations. (Closed)
Patch Set: . Created 3 years, 9 months 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef SimTest_h 5 #ifndef SimTest_h
6 #define SimTest_h 6 #define SimTest_h
7 7
8 #include <gtest/gtest.h>
8 #include "web/tests/FrameTestHelpers.h" 9 #include "web/tests/FrameTestHelpers.h"
9 #include "web/tests/sim/SimCompositor.h" 10 #include "web/tests/sim/SimCompositor.h"
10 #include "web/tests/sim/SimNetwork.h" 11 #include "web/tests/sim/SimNetwork.h"
11 #include "web/tests/sim/SimPage.h" 12 #include "web/tests/sim/SimPage.h"
13 #include "web/tests/sim/SimWebFrameClient.h"
12 #include "web/tests/sim/SimWebViewClient.h" 14 #include "web/tests/sim/SimWebViewClient.h"
13 #include <gtest/gtest.h>
14 15
15 namespace blink { 16 namespace blink {
16 17
17 class WebViewImpl; 18 class WebViewImpl;
18 class WebLocalFrameImpl; 19 class WebLocalFrameImpl;
19 class Document; 20 class Document;
20 class LocalDOMWindow; 21 class LocalDOMWindow;
21 22
22 class SimTest : public ::testing::Test { 23 class SimTest : public ::testing::Test {
23 protected: 24 protected:
24 SimTest(); 25 SimTest();
25 ~SimTest() override; 26 ~SimTest() override;
26 27
27 void loadURL(const String& url); 28 void loadURL(const String& url);
28 29
29 LocalDOMWindow& window(); 30 LocalDOMWindow& window();
30 SimPage& page(); 31 SimPage& page();
31 Document& document(); 32 Document& document();
32 WebViewImpl& webView(); 33 WebViewImpl& webView();
33 WebLocalFrameImpl& mainFrame(); 34 WebLocalFrameImpl& mainFrame();
34 const SimWebViewClient& webViewClient() const; 35 const SimWebViewClient& webViewClient() const;
35 SimCompositor& compositor(); 36 SimCompositor& compositor();
36 37
38 Vector<String>& consoleMessages() { return m_consoleMessages; }
39
37 private: 40 private:
41 friend class SimWebFrameClient;
42
43 void addConsoleMessage(const String&);
44
38 SimNetwork m_network; 45 SimNetwork m_network;
39 SimCompositor m_compositor; 46 SimCompositor m_compositor;
40 SimWebViewClient m_webViewClient; 47 SimWebViewClient m_webViewClient;
48 SimWebFrameClient m_webFrameClient;
41 SimPage m_page; 49 SimPage m_page;
42 FrameTestHelpers::WebViewHelper m_webViewHelper; 50 FrameTestHelpers::WebViewHelper m_webViewHelper;
51
52 Vector<String> m_consoleMessages;
43 }; 53 };
44 54
45 } // namespace blink 55 } // namespace blink
46 56
47 #endif 57 #endif
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/tests/WindowProxyTest.cpp ('k') | third_party/WebKit/Source/web/tests/sim/SimTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698