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

Side by Side Diff: third_party/WebKit/Source/web/tests/ChromeClientImplTest.cpp

Issue 2967013002: Be explicit about namespace testing to not mix it with blink::testing (Closed)
Patch Set: Dropped mojo parts that need another review. Created 3 years, 5 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 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 WebNavigationPolicy, 73 WebNavigationPolicy,
74 bool, 74 bool,
75 WebSandboxFlags) override { 75 WebSandboxFlags) override {
76 return web_view_helper_.InitializeWithOpener(opener); 76 return web_view_helper_.InitializeWithOpener(opener);
77 } 77 }
78 78
79 private: 79 private:
80 FrameTestHelpers::WebViewHelper web_view_helper_; 80 FrameTestHelpers::WebViewHelper web_view_helper_;
81 }; 81 };
82 82
83 class CreateWindowTest : public testing::Test { 83 class CreateWindowTest : public ::testing::Test {
84 protected: 84 protected:
85 void SetUp() override { 85 void SetUp() override {
86 web_view_ = helper_.Initialize(nullptr, &web_view_client_); 86 web_view_ = helper_.Initialize(nullptr, &web_view_client_);
87 main_frame_ = helper_.LocalMainFrame(); 87 main_frame_ = helper_.LocalMainFrame();
88 chrome_client_impl_ = 88 chrome_client_impl_ =
89 ToChromeClientImpl(&web_view_->GetPage()->GetChromeClient()); 89 ToChromeClientImpl(&web_view_->GetPage()->GetChromeClient());
90 } 90 }
91 91
92 ViewCreatingClient web_view_client_; 92 ViewCreatingClient web_view_client_;
93 FrameTestHelpers::WebViewHelper helper_; 93 FrameTestHelpers::WebViewHelper helper_;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 // DateTimeChooserClient 154 // DateTimeChooserClient
155 Element& OwnerElement() const override { return *owner_element_; } 155 Element& OwnerElement() const override { return *owner_element_; }
156 void DidChooseValue(const String&) override {} 156 void DidChooseValue(const String&) override {}
157 void DidChooseValue(double) override {} 157 void DidChooseValue(double) override {}
158 void DidEndChooser() override {} 158 void DidEndChooser() override {}
159 159
160 private: 160 private:
161 Member<Element> owner_element_; 161 Member<Element> owner_element_;
162 }; 162 };
163 163
164 class PagePopupSuppressionTest : public testing::Test { 164 class PagePopupSuppressionTest : public ::testing::Test {
165 public: 165 public:
166 PagePopupSuppressionTest() {} 166 PagePopupSuppressionTest() {}
167 167
168 bool CanOpenColorChooser() { 168 bool CanOpenColorChooser() {
169 LocalFrame* frame = main_frame_->GetFrame(); 169 LocalFrame* frame = main_frame_->GetFrame();
170 Color color; 170 Color color;
171 return !!chrome_client_impl_->OpenColorChooser(frame, color_chooser_client_, 171 return !!chrome_client_impl_->OpenColorChooser(frame, color_chooser_client_,
172 color); 172 color);
173 } 173 }
174 174
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
246 Settings* settings = GetSettings(); 246 Settings* settings = GetSettings();
247 settings->SetPagePopupsSuppressed(true); 247 settings->SetPagePopupsSuppressed(true);
248 248
249 EXPECT_FALSE(CanOpenPopupMenu()); 249 EXPECT_FALSE(CanOpenPopupMenu());
250 250
251 settings->SetPagePopupsSuppressed(false); 251 settings->SetPagePopupsSuppressed(false);
252 EXPECT_TRUE(CanOpenPopupMenu()); 252 EXPECT_TRUE(CanOpenPopupMenu());
253 } 253 }
254 254
255 } // namespace blink 255 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698