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

Side by Side Diff: components/test_runner/web_frame_test_client.cc

Issue 1989103006: Fix event warning crash when a listener is removed while dispatching event (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: now compare against actual listener() Created 4 years, 7 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
OLDNEW
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 "components/test_runner/web_frame_test_client.h" 5 #include "components/test_runner/web_frame_test_client.h"
6 6
7 #include <memory> 7 #include <memory>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/string_piece.h" 10 #include "base/strings/string_piece.h"
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 delegate_->PrintMessage(" - didFinishLoading\n"); 656 delegate_->PrintMessage(" - didFinishLoading\n");
657 } 657 }
658 resource_identifier_map_.erase(identifier); 658 resource_identifier_map_.erase(identifier);
659 } 659 }
660 660
661 void WebFrameTestClient::didAddMessageToConsole( 661 void WebFrameTestClient::didAddMessageToConsole(
662 const blink::WebConsoleMessage& message, 662 const blink::WebConsoleMessage& message,
663 const blink::WebString& source_name, 663 const blink::WebString& source_name,
664 unsigned source_line, 664 unsigned source_line,
665 const blink::WebString& stack_trace) { 665 const blink::WebString& stack_trace) {
666 if (!test_runner_->ShouldDumpConsoleMessages())
667 return;
666 std::string level; 668 std::string level;
667 switch (message.level) { 669 switch (message.level) {
668 case blink::WebConsoleMessage::LevelDebug: 670 case blink::WebConsoleMessage::LevelDebug:
669 level = "DEBUG"; 671 level = "DEBUG";
670 break; 672 break;
671 case blink::WebConsoleMessage::LevelLog: 673 case blink::WebConsoleMessage::LevelLog:
672 level = "MESSAGE"; 674 level = "MESSAGE";
673 break; 675 break;
674 case blink::WebConsoleMessage::LevelInfo: 676 case blink::WebConsoleMessage::LevelInfo:
675 level = "INFO"; 677 level = "INFO";
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
743 else 745 else
744 callback->onError(blink::WebSetSinkIdError::NotFound); 746 callback->onError(blink::WebSetSinkIdError::NotFound);
745 } 747 }
746 748
747 void WebFrameTestClient::didClearWindowObject(blink::WebLocalFrame* frame) { 749 void WebFrameTestClient::didClearWindowObject(blink::WebLocalFrame* frame) {
748 web_test_proxy_base_->test_interfaces()->BindTo(frame); 750 web_test_proxy_base_->test_interfaces()->BindTo(frame);
749 web_test_proxy_base_->BindTo(frame); 751 web_test_proxy_base_->BindTo(frame);
750 } 752 }
751 753
752 } // namespace test_runner 754 } // namespace test_runner
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698