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

Side by Side Diff: content/shell/renderer/layout_test/blink_test_runner.cc

Issue 2689483007: Tests of ctrl-click can't postMessage to opener - using custom text instead. (Closed)
Patch Set: Rebasing... Created 3 years, 8 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
« no previous file with comments | « no previous file | content/shell/test_runner/test_interfaces.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer/layout_test/blink_test_runner.h" 5 #include "content/shell/renderer/layout_test/blink_test_runner.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <clocale> 10 #include <clocale>
(...skipping 584 matching lines...) Expand 10 before | Expand all | Expand 10 after
595 .Utf8(); 595 .Utf8();
596 } 596 }
597 597
598 void BlinkTestRunner::SetLocale(const std::string& locale) { 598 void BlinkTestRunner::SetLocale(const std::string& locale) {
599 setlocale(LC_ALL, locale.c_str()); 599 setlocale(LC_ALL, locale.c_str());
600 } 600 }
601 601
602 void BlinkTestRunner::OnLayoutTestRuntimeFlagsChanged( 602 void BlinkTestRunner::OnLayoutTestRuntimeFlagsChanged(
603 const base::DictionaryValue& changed_values) { 603 const base::DictionaryValue& changed_values) {
604 // Ignore changes that happen before we got the initial, accumulated 604 // Ignore changes that happen before we got the initial, accumulated
605 // layout flag changes in ShellViewMsg_ReplicateTestConfiguration. 605 // layout flag changes in either OnReplicateTestConfiguration or
606 if (!is_main_window_) 606 // OnSetTestConfiguration.
607 test_runner::WebTestInterfaces* interfaces =
608 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces();
609 if (!interfaces->TestIsRunning())
607 return; 610 return;
608 611
609 RenderThread::Get()->Send( 612 RenderThread::Get()->Send(
610 new LayoutTestHostMsg_LayoutTestRuntimeFlagsChanged(changed_values)); 613 new LayoutTestHostMsg_LayoutTestRuntimeFlagsChanged(changed_values));
611 } 614 }
612 615
613 void BlinkTestRunner::TestFinished() { 616 void BlinkTestRunner::TestFinished() {
617 test_runner::WebTestInterfaces* interfaces =
618 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces();
619 interfaces->SetTestIsRunning(false);
620
614 if (!is_main_window_ || !render_view()->GetMainRenderFrame()) { 621 if (!is_main_window_ || !render_view()->GetMainRenderFrame()) {
615 RenderThread::Get()->Send( 622 RenderThread::Get()->Send(
616 new LayoutTestHostMsg_TestFinishedInSecondaryRenderer()); 623 new LayoutTestHostMsg_TestFinishedInSecondaryRenderer());
617 return; 624 return;
618 } 625 }
619 test_runner::WebTestInterfaces* interfaces = 626
620 LayoutTestRenderThreadObserver::GetInstance()->test_interfaces();
621 interfaces->SetTestIsRunning(false);
622 if (interfaces->TestRunner()->ShouldDumpBackForwardList()) { 627 if (interfaces->TestRunner()->ShouldDumpBackForwardList()) {
623 SyncNavigationStateVisitor visitor; 628 SyncNavigationStateVisitor visitor;
624 RenderView::ForEach(&visitor); 629 RenderView::ForEach(&visitor);
625 Send(new ShellViewHostMsg_CaptureSessionHistory(routing_id())); 630 Send(new ShellViewHostMsg_CaptureSessionHistory(routing_id()));
626 } else { 631 } else {
627 // clean out the lifecycle if needed before capturing the layout tree 632 // clean out the lifecycle if needed before capturing the layout tree
628 // dump and pixels from the compositor. 633 // dump and pixels from the compositor.
629 render_view() 634 render_view()
630 ->GetWebView() 635 ->GetWebView()
631 ->MainFrame() 636 ->MainFrame()
(...skipping 421 matching lines...) Expand 10 before | Expand all | Expand 10 after
1053 void BlinkTestRunner::ReportLeakDetectionResult( 1058 void BlinkTestRunner::ReportLeakDetectionResult(
1054 const LeakDetectionResult& report) { 1059 const LeakDetectionResult& report) {
1055 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 1060 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
1056 } 1061 }
1057 1062
1058 void BlinkTestRunner::OnDestruct() { 1063 void BlinkTestRunner::OnDestruct() {
1059 delete this; 1064 delete this;
1060 } 1065 }
1061 1066
1062 } // namespace content 1067 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/shell/test_runner/test_interfaces.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698