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

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

Issue 938013002: Set default page scale limits after setting webkit preferences. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Set defaultPageScaleLimit after setting WebKitPreferences Created 5 years, 10 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 | no next file » | 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 647 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 658
659 void WebKitTestRunner::Reset() { 659 void WebKitTestRunner::Reset() {
660 // The proxy_ is always non-NULL, it is set right after construction. 660 // The proxy_ is always non-NULL, it is set right after construction.
661 proxy_->set_widget(render_view()->GetWebView()); 661 proxy_->set_widget(render_view()->GetWebView());
662 proxy_->Reset(); 662 proxy_->Reset();
663 prefs_.Reset(); 663 prefs_.Reset();
664 routing_ids_.clear(); 664 routing_ids_.clear();
665 session_histories_.clear(); 665 session_histories_.clear();
666 current_entry_indexes_.clear(); 666 current_entry_indexes_.clear();
667 667
668 render_view()->SetWebkitPreferences(render_view()->GetWebkitPreferences());
668 render_view()->ClearEditCommands(); 669 render_view()->ClearEditCommands();
669 render_view()->GetWebView()->mainFrame()->setName(WebString()); 670 render_view()->GetWebView()->mainFrame()->setName(WebString());
670 render_view()->GetWebView()->mainFrame()->clearOpener(); 671 render_view()->GetWebView()->mainFrame()->clearOpener();
671 render_view()->GetWebView()->setDefaultPageScaleLimits(1, 4); 672 render_view()->GetWebView()->setDefaultPageScaleLimits(1, 4);
672 render_view()->GetWebView()->setPageScaleFactor(1, WebPoint(0, 0)); 673 render_view()->GetWebView()->setPageScaleFactor(1, WebPoint(0, 0));
673 674
674 // Resetting the internals object also overrides the WebPreferences, so we 675 // Resetting the internals object also overrides the WebPreferences, so we
aelias_OOO_until_Jul13 2015/02/20 00:39:58 This comment indicates that the resetInternalsObje
675 // have to sync them to WebKit again. 676 // have to sync them to WebKit again.
676 WebTestingSupport::resetInternalsObject( 677 WebTestingSupport::resetInternalsObject(
677 render_view()->GetWebView()->mainFrame()->toWebLocalFrame()); 678 render_view()->GetWebView()->mainFrame()->toWebLocalFrame());
678 render_view()->SetWebkitPreferences(render_view()->GetWebkitPreferences());
679 } 679 }
680 680
681 // Private methods ----------------------------------------------------------- 681 // Private methods -----------------------------------------------------------
682 682
683 void WebKitTestRunner::CaptureDump() { 683 void WebKitTestRunner::CaptureDump() {
684 WebTestInterfaces* interfaces = 684 WebTestInterfaces* interfaces =
685 LayoutTestRenderProcessObserver::GetInstance()->test_interfaces(); 685 LayoutTestRenderProcessObserver::GetInstance()->test_interfaces();
686 TRACE_EVENT0("shell", "WebKitTestRunner::CaptureDump"); 686 TRACE_EVENT0("shell", "WebKitTestRunner::CaptureDump");
687 687
688 if (interfaces->TestRunner()->ShouldDumpAsAudio()) { 688 if (interfaces->TestRunner()->ShouldDumpAsAudio()) {
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 790
791 leak_detector_->TryLeakDetection(main_frame); 791 leak_detector_->TryLeakDetection(main_frame);
792 } 792 }
793 793
794 void WebKitTestRunner::ReportLeakDetectionResult( 794 void WebKitTestRunner::ReportLeakDetectionResult(
795 const LeakDetectionResult& report) { 795 const LeakDetectionResult& report) {
796 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report)); 796 Send(new ShellViewHostMsg_LeakDetectionDone(routing_id(), report));
797 } 797 }
798 798
799 } // namespace content 799 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698