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

Side by Side Diff: third_party/WebKit/Source/core/dom/ScriptRunnerTest.cpp

Issue 1419293005: Add assertions that the empty Platform::cryptographicallyRandomValues() overrides are not being use… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "config.h" 5 #include "config.h"
6 #include "core/dom/ScriptRunner.h" 6 #include "core/dom/ScriptRunner.h"
7 7
8 #include "core/dom/Document.h" 8 #include "core/dom/Document.h"
9 #include "core/dom/Element.h" 9 #include "core/dom/Element.h"
10 #include "core/dom/ScriptLoader.h" 10 #include "core/dom/ScriptLoader.h"
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 }; 95 };
96 96
97 class MockPlatform : public Platform, private WebScheduler { 97 class MockPlatform : public Platform, private WebScheduler {
98 public: 98 public:
99 MockPlatform() 99 MockPlatform()
100 : m_mockWebThread(this) 100 : m_mockWebThread(this)
101 , m_mockWebTaskRunner(&m_tasks) 101 , m_mockWebTaskRunner(&m_tasks)
102 { 102 {
103 } 103 }
104 104
105 void cryptographicallyRandomValues(unsigned char* buffer, size_t length) ove rride { } 105 void cryptographicallyRandomValues(unsigned char* buffer, size_t length) ove rride
106 {
107 ASSERT_NOT_REACHED();
108 }
106 109
107 const unsigned char* getTraceCategoryEnabledFlag(const char* categoryName) o verride 110 const unsigned char* getTraceCategoryEnabledFlag(const char* categoryName) o verride
108 { 111 {
109 static const unsigned char tracingIsDisabled = 0; 112 static const unsigned char tracingIsDisabled = 0;
110 return &tracingIsDisabled; 113 return &tracingIsDisabled;
111 } 114 }
112 115
113 WebThread* currentThread() override { return &m_mockWebThread; } 116 WebThread* currentThread() override { return &m_mockWebThread; }
114 117
115 WebTaskRunner* loadingTaskRunner() override 118 WebTaskRunner* loadingTaskRunner() override
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 #endif 552 #endif
550 553
551 // m_scriptRunner is gone. We need to make sure that ScriptRunner::Task do n ot access dead object. 554 // m_scriptRunner is gone. We need to make sure that ScriptRunner::Task do n ot access dead object.
552 EXPECT_CALL(*scriptLoader1, execute()).Times(0); 555 EXPECT_CALL(*scriptLoader1, execute()).Times(0);
553 EXPECT_CALL(*scriptLoader2, execute()).Times(0); 556 EXPECT_CALL(*scriptLoader2, execute()).Times(0);
554 557
555 m_platform.runAllTasks(); 558 m_platform.runAllTasks();
556 } 559 }
557 560
558 } // namespace blink 561 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698