OLD | NEW |
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 #include "components/web_view/public/cpp/web_view.h" | 5 #include "components/web_view/public/cpp/web_view.h" |
6 | 6 |
7 #include <stdint.h> | 7 #include <stdint.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/base_paths.h" | 10 #include "base/base_paths.h" |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
89 } | 89 } |
90 | 90 |
91 private: | 91 private: |
92 void QuitNestedRunLoop() { | 92 void QuitNestedRunLoop() { |
93 if (run_loop_) { | 93 if (run_loop_) { |
94 quit_condition_ = NO_QUIT; | 94 quit_condition_ = NO_QUIT; |
95 run_loop_->Quit(); | 95 run_loop_->Quit(); |
96 } | 96 } |
97 } | 97 } |
98 | 98 |
99 // Overridden from ApplicationDelegate: | 99 // Overridden from mojo::ShellClient: |
100 void Initialize(mojo::Shell* shell, const std::string& url, | 100 void Initialize(mojo::Shell* shell, const std::string& url, |
101 uint32_t id) override { | 101 uint32_t id) override { |
102 WindowServerTestBase::Initialize(shell, url, id); | 102 WindowServerTestBase::Initialize(shell, url, id); |
103 shell_ = shell; | 103 shell_ = shell; |
104 } | 104 } |
105 | 105 |
106 // Overridden from WindowTreeDelegate: | 106 // Overridden from WindowTreeDelegate: |
107 void OnEmbed(mus::Window* root) override { | 107 void OnEmbed(mus::Window* root) override { |
108 content_ = root->connection()->NewWindow(); | 108 content_ = root->connection()->NewWindow(); |
109 content_->SetBounds(root->bounds()); | 109 content_->SetBounds(root->bounds()); |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 EXPECT_EQ(i, active_find_match()); | 309 EXPECT_EQ(i, active_find_match()); |
310 } | 310 } |
311 | 311 |
312 // We should wrap around. | 312 // We should wrap around. |
313 web_view()->Find("Green", true); | 313 web_view()->Find("Green", true); |
314 StartNestedRunLoopUntil(ACTIVE_FIND_UPDATE); | 314 StartNestedRunLoopUntil(ACTIVE_FIND_UPDATE); |
315 EXPECT_EQ(1, active_find_match()); | 315 EXPECT_EQ(1, active_find_match()); |
316 } | 316 } |
317 | 317 |
318 } // namespace web_view | 318 } // namespace web_view |
OLD | NEW |