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

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

Issue 1073533002: OOPIF: Don't crash when running layout tests that have an OOP iframe. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/renderer/test_runner/accessibility_controller.cc » ('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/webkit_test_runner.h" 5 #include "content/shell/renderer/layout_test/webkit_test_runner.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <clocale> 8 #include <clocale>
9 #include <cmath> 9 #include <cmath>
10 10
(...skipping 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 void WebKitTestRunner::Reset() { 650 void WebKitTestRunner::Reset() {
651 // The proxy_ is always non-NULL, it is set right after construction. 651 // The proxy_ is always non-NULL, it is set right after construction.
652 proxy_->set_widget(render_view()->GetWebView()); 652 proxy_->set_widget(render_view()->GetWebView());
653 proxy_->Reset(); 653 proxy_->Reset();
654 prefs_.Reset(); 654 prefs_.Reset();
655 routing_ids_.clear(); 655 routing_ids_.clear();
656 session_histories_.clear(); 656 session_histories_.clear();
657 current_entry_indexes_.clear(); 657 current_entry_indexes_.clear();
658 658
659 render_view()->ClearEditCommands(); 659 render_view()->ClearEditCommands();
660 render_view()->GetWebView()->mainFrame()->setName(WebString()); 660 if (render_view()->GetWebView()->mainFrame()->isWebLocalFrame())
661 render_view()->GetWebView()->mainFrame()->setName(WebString());
661 render_view()->GetWebView()->mainFrame()->clearOpener(); 662 render_view()->GetWebView()->mainFrame()->clearOpener();
662 663
663 // Resetting the internals object also overrides the WebPreferences, so we 664 // Resetting the internals object also overrides the WebPreferences, so we
664 // have to sync them to WebKit again. 665 // have to sync them to WebKit again.
665 WebTestingSupport::resetInternalsObject( 666 if (render_view()->GetWebView()->mainFrame()->isWebLocalFrame()) {
666 render_view()->GetWebView()->mainFrame()->toWebLocalFrame()); 667 WebTestingSupport::resetInternalsObject(
667 render_view()->SetWebkitPreferences(render_view()->GetWebkitPreferences()); 668 render_view()->GetWebView()->mainFrame()->toWebLocalFrame());
669 render_view()->SetWebkitPreferences(render_view()->GetWebkitPreferences());
670 }
668 } 671 }
669 672
670 // Private methods ----------------------------------------------------------- 673 // Private methods -----------------------------------------------------------
671 674
672 void WebKitTestRunner::CaptureDump() { 675 void WebKitTestRunner::CaptureDump() {
673 WebTestInterfaces* interfaces = 676 WebTestInterfaces* interfaces =
674 LayoutTestRenderProcessObserver::GetInstance()->test_interfaces(); 677 LayoutTestRenderProcessObserver::GetInstance()->test_interfaces();
675 TRACE_EVENT0("shell", "WebKitTestRunner::CaptureDump"); 678 TRACE_EVENT0("shell", "WebKitTestRunner::CaptureDump");
676 679
677 if (interfaces->TestRunner()->ShouldDumpAsAudio()) { 680 if (interfaces->TestRunner()->ShouldDumpAsAudio()) {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
779 782
780 leak_detector_->TryLeakDetection(main_frame); 783 leak_detector_->TryLeakDetection(main_frame);
781 } 784 }
782 785
783 void WebKitTestRunner::ReportLeakDetectionResult( 786 void WebKitTestRunner::ReportLeakDetectionResult(
784 const LeakDetectionResult& report) { 787 const LeakDetectionResult& report) {
785 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 788 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
786 } 789 }
787 790
788 } // namespace content 791 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/shell/renderer/test_runner/accessibility_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698