summaryrefslogtreecommitdiff
path: root/chromium/third_party/blink/renderer/core/timing/performance_observer_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/blink/renderer/core/timing/performance_observer_test.cc')
-rw-r--r--chromium/third_party/blink/renderer/core/timing/performance_observer_test.cc18
1 files changed, 11 insertions, 7 deletions
diff --git a/chromium/third_party/blink/renderer/core/timing/performance_observer_test.cc b/chromium/third_party/blink/renderer/core/timing/performance_observer_test.cc
index d7607e53281..cc57dcdf9be 100644
--- a/chromium/third_party/blink/renderer/core/timing/performance_observer_test.cc
+++ b/chromium/third_party/blink/renderer/core/timing/performance_observer_test.cc
@@ -7,12 +7,13 @@
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/task_type.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_binding_for_testing.h"
+#include "third_party/blink/renderer/bindings/core/v8/v8_performance_mark_options.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_performance_observer_callback.h"
+#include "third_party/blink/renderer/bindings/core/v8/v8_performance_observer_init.h"
#include "third_party/blink/renderer/core/execution_context/execution_context.h"
#include "third_party/blink/renderer/core/timing/layout_shift.h"
#include "third_party/blink/renderer/core/timing/performance.h"
#include "third_party/blink/renderer/core/timing/performance_mark.h"
-#include "third_party/blink/renderer/core/timing/performance_observer_init.h"
#include "third_party/blink/renderer/core/timing/window_performance.h"
namespace blink {
@@ -88,9 +89,10 @@ TEST_F(PerformanceObserverTest, Enqueue) {
NonThrowableExceptionState exception_state;
Initialize(scope.GetScriptState());
- ScriptValue empty_value;
+ PerformanceMarkOptions* options = PerformanceMarkOptions::Create();
+ options->setStartTime(1234);
Persistent<PerformanceEntry> entry = PerformanceMark::Create(
- scope.GetScriptState(), "m", 1234, empty_value, exception_state);
+ scope.GetScriptState(), "m", options, exception_state);
EXPECT_EQ(0, NumPerformanceEntries());
observer_->EnqueuePerformanceEntry(*entry);
@@ -102,9 +104,10 @@ TEST_F(PerformanceObserverTest, Deliver) {
NonThrowableExceptionState exception_state;
Initialize(scope.GetScriptState());
- ScriptValue empty_value;
+ PerformanceMarkOptions* options = PerformanceMarkOptions::Create();
+ options->setStartTime(1234);
Persistent<PerformanceEntry> entry = PerformanceMark::Create(
- scope.GetScriptState(), "m", 1234, empty_value, exception_state);
+ scope.GetScriptState(), "m", options, exception_state);
EXPECT_EQ(0, NumPerformanceEntries());
observer_->EnqueuePerformanceEntry(*entry);
@@ -119,9 +122,10 @@ TEST_F(PerformanceObserverTest, Disconnect) {
NonThrowableExceptionState exception_state;
Initialize(scope.GetScriptState());
- ScriptValue empty_value;
+ PerformanceMarkOptions* options = PerformanceMarkOptions::Create();
+ options->setStartTime(1234);
Persistent<PerformanceEntry> entry = PerformanceMark::Create(
- scope.GetScriptState(), "m", 1234, empty_value, exception_state);
+ scope.GetScriptState(), "m", options, exception_state);
EXPECT_EQ(0, NumPerformanceEntries());
observer_->EnqueuePerformanceEntry(*entry);