chromium/third_party/blink/renderer/bindings/core/v8/window_proxy_test.cc

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "third_party/blink/renderer/bindings/core/v8/window_proxy.h"

#include "base/debug/stack_trace.h"
#include "base/memory/raw_ref.h"
#include "third_party/blink/public/web/web_script_source.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/testing/sim/sim_request.h"
#include "third_party/blink/renderer/core/testing/sim/sim_test.h"
#include "third_party/blink/renderer/platform/bindings/dom_wrapper_world.h"
#include "third_party/blink/renderer/platform/testing/unit_test_helpers.h"
#include "v8/include/v8-local-handle.h"

namespace blink {

namespace {

class DidClearWindowObjectCounter
    : public frame_test_helpers::TestWebFrameClient {};

class WindowProxyTest : public SimTest {};

// A document without any script should not trigger WindowProxy initialization.
TEST_F(WindowProxyTest, NotInitializedIfNoScript) {}

// A named item currently triggers WindowProxy initialization.
// TODO(dcheng): It's not clear if this is necessary or if it can be done lazily
// instead.
TEST_F(WindowProxyTest, NamedItem) {}

// Tests that a WindowProxy is reinitialized after a navigation, even if the new
// Document does not use any scripting.
TEST_F(WindowProxyTest, ReinitializedAfterNavigation) {}

TEST_F(WindowProxyTest, IsolatedWorldReinitializedAfterNavigation) {}

}  // namespace

}  // namespace blink