Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/shell/browser/layout_test/blink_test_controller.h" | 5 #include "content/shell/browser/layout_test/blink_test_controller.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <iostream> | 9 #include <iostream> |
| 10 #include <set> | 10 #include <set> |
| (...skipping 237 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 248 GpuDataManager::GetInstance()->AddObserver(this); | 248 GpuDataManager::GetInstance()->AddObserver(this); |
| 249 ResetAfterLayoutTest(); | 249 ResetAfterLayoutTest(); |
| 250 } | 250 } |
| 251 | 251 |
| 252 BlinkTestController::~BlinkTestController() { | 252 BlinkTestController::~BlinkTestController() { |
| 253 DCHECK(CalledOnValidThread()); | 253 DCHECK(CalledOnValidThread()); |
| 254 CHECK(instance_ == this); | 254 CHECK(instance_ == this); |
| 255 CHECK(test_phase_ == BETWEEN_TESTS); | 255 CHECK(test_phase_ == BETWEEN_TESTS); |
| 256 GpuDataManager::GetInstance()->RemoveObserver(this); | 256 GpuDataManager::GetInstance()->RemoveObserver(this); |
| 257 DiscardMainWindow(); | 257 DiscardMainWindow(); |
| 258 Shell::CloseAllWindows(); | |
|
Peter Beverloo
2016/09/22 12:21:40
Maybe we should consider moving this to LayoutTest
| |
| 258 instance_ = NULL; | 259 instance_ = NULL; |
| 259 } | 260 } |
| 260 | 261 |
| 261 bool BlinkTestController::PrepareForLayoutTest( | 262 bool BlinkTestController::PrepareForLayoutTest( |
| 262 const GURL& test_url, | 263 const GURL& test_url, |
| 263 const base::FilePath& current_working_directory, | 264 const base::FilePath& current_working_directory, |
| 264 bool enable_pixel_dumping, | 265 bool enable_pixel_dumping, |
| 265 const std::string& expected_pixel_hash) { | 266 const std::string& expected_pixel_hash) { |
| 266 DCHECK(CalledOnValidThread()); | 267 DCHECK(CalledOnValidThread()); |
| 267 test_phase_ = DURING_TEST; | 268 test_phase_ = DURING_TEST; |
| (...skipping 676 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 944 } else { | 945 } else { |
| 945 printer_->AddErrorMessage(base::StringPrintf( | 946 printer_->AddErrorMessage(base::StringPrintf( |
| 946 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", | 947 "FAIL: Unexpected sendBluetoothManualChooserEvent() event name '%s'.", |
| 947 event_name.c_str())); | 948 event_name.c_str())); |
| 948 return; | 949 return; |
| 949 } | 950 } |
| 950 bluetooth_chooser_factory_->SendEvent(event, argument); | 951 bluetooth_chooser_factory_->SendEvent(event, argument); |
| 951 } | 952 } |
| 952 | 953 |
| 953 } // namespace content | 954 } // namespace content |
| OLD | NEW |