| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "InternalsNavigatorContentUtils.h" | 5 #include "InternalsNavigatorContentUtils.h" |
| 6 | 6 |
| 7 #include "core/dom/Document.h" | 7 #include "core/dom/Document.h" |
| 8 #include "core/frame/LocalDOMWindow.h" |
| 8 #include "core/testing/Internals.h" | 9 #include "core/testing/Internals.h" |
| 9 #include "modules/navigatorcontentutils/NavigatorContentUtils.h" | 10 #include "modules/navigatorcontentutils/NavigatorContentUtils.h" |
| 10 #include "modules/navigatorcontentutils/testing/NavigatorContentUtilsClientMock.
h" | 11 #include "modules/navigatorcontentutils/testing/NavigatorContentUtilsClientMock.
h" |
| 11 | 12 |
| 12 namespace blink { | 13 namespace blink { |
| 13 | 14 |
| 14 void InternalsNavigatorContentUtils::setNavigatorContentUtilsClientMock( | 15 void InternalsNavigatorContentUtils::setNavigatorContentUtilsClientMock( |
| 15 Internals&, | 16 Internals&, |
| 16 Document* document) { | 17 Document* document) { |
| 17 ASSERT(document && document->page()); | 18 ASSERT(document && document->page()); |
| 18 NavigatorContentUtils* navigatorContentUtils = | 19 NavigatorContentUtils* navigatorContentUtils = |
| 19 NavigatorContentUtils::from(*document->frame()); | 20 NavigatorContentUtils::from(*document->domWindow()->navigator()); |
| 20 navigatorContentUtils->setClientForTest( | 21 navigatorContentUtils->setClientForTest( |
| 21 NavigatorContentUtilsClientMock::create()); | 22 NavigatorContentUtilsClientMock::create()); |
| 22 } | 23 } |
| 23 | 24 |
| 24 } // namespace blink | 25 } // namespace blink |
| OLD | NEW |