| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 "base/command_line.h" | 5 #include "base/command_line.h" |
| 6 #include "base/strings/string_number_conversions.h" | 6 #include "base/strings/string_number_conversions.h" |
| 7 #include "chrome/browser/ui/browser.h" | 7 #include "chrome/browser/ui/browser.h" |
| 8 #include "chrome/browser/ui/browser_window.h" | 8 #include "chrome/browser/ui/browser_window.h" |
| 9 #include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h" | 9 #include "chrome/browser/ui/exclusive_access/fullscreen_controller_test.h" |
| 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 10 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 361 const std::set<std::string>& expected_fullscreen_event_ids, | 361 const std::set<std::string>& expected_fullscreen_event_ids, |
| 362 content::DOMMessageQueue& queue) { | 362 content::DOMMessageQueue& queue) { |
| 363 std::set<std::string> remaining_events(expected_fullscreen_event_ids); | 363 std::set<std::string> remaining_events(expected_fullscreen_event_ids); |
| 364 bool resize_validated = false; | 364 bool resize_validated = false; |
| 365 std::string response; | 365 std::string response; |
| 366 while (queue.WaitForMessage(&response)) { | 366 while (queue.WaitForMessage(&response)) { |
| 367 base::TrimString(response, "\"", &response); | 367 base::TrimString(response, "\"", &response); |
| 368 std::vector<std::string> response_params = base::SplitString( | 368 std::vector<std::string> response_params = base::SplitString( |
| 369 response, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); | 369 response, " ", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL); |
| 370 if (response_params[0] == "fullscreenchange") { | 370 if (response_params[0] == "fullscreenchange") { |
| 371 EXPECT_TRUE(ContainsKey(remaining_events, response_params[1])); | 371 EXPECT_TRUE(base::ContainsKey(remaining_events, response_params[1])); |
| 372 remaining_events.erase(response_params[1]); | 372 remaining_events.erase(response_params[1]); |
| 373 } else if (response_params[0] == "resize") { | 373 } else if (response_params[0] == "resize") { |
| 374 resize_validated = true; | 374 resize_validated = true; |
| 375 } | 375 } |
| 376 if (remaining_events.empty() && resize_validated) | 376 if (remaining_events.empty() && resize_validated) |
| 377 break; | 377 break; |
| 378 } | 378 } |
| 379 } | 379 } |
| 380 | 380 |
| 381 } // namespace | 381 } // namespace |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 "document.pointerLockElement)", | 763 "document.pointerLockElement)", |
| 764 &mouse_locked)); | 764 &mouse_locked)); |
| 765 EXPECT_TRUE(mouse_locked); | 765 EXPECT_TRUE(mouse_locked); |
| 766 EXPECT_TRUE(main_frame->GetView()->IsMouseLocked()); | 766 EXPECT_TRUE(main_frame->GetView()->IsMouseLocked()); |
| 767 | 767 |
| 768 EXPECT_TRUE(ExecuteScript(main_frame, | 768 EXPECT_TRUE(ExecuteScript(main_frame, |
| 769 "document.querySelector('iframe').parentNode." | 769 "document.querySelector('iframe').parentNode." |
| 770 "removeChild(document.querySelector('iframe'))")); | 770 "removeChild(document.querySelector('iframe'))")); |
| 771 EXPECT_FALSE(main_frame->GetView()->IsMouseLocked()); | 771 EXPECT_FALSE(main_frame->GetView()->IsMouseLocked()); |
| 772 } | 772 } |
| OLD | NEW |