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

Side by Side Diff: third_party/WebKit/Source/core/css/MediaQueryListTest.cpp

Issue 1858753003: Remove RawPtr from core/css (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 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 "core/css/MediaQueryList.h" 5 #include "core/css/MediaQueryList.h"
6 6
7 #include "core/css/MediaList.h" 7 #include "core/css/MediaList.h"
8 #include "core/css/MediaQueryListListener.h" 8 #include "core/css/MediaQueryListListener.h"
9 #include "core/css/MediaQueryMatcher.h" 9 #include "core/css/MediaQueryMatcher.h"
10 #include "core/dom/Document.h" 10 #include "core/dom/Document.h"
11 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
12 12
13 namespace blink { 13 namespace blink {
14 14
15 namespace { 15 namespace {
16 16
17 class TestListener : public MediaQueryListListener { 17 class TestListener : public MediaQueryListListener {
18 public: 18 public:
19 void notifyMediaQueryChanged() override { } 19 void notifyMediaQueryChanged() override { }
20 }; 20 };
21 21
22 } // anonymous namespace 22 } // anonymous namespace
23 23
24 TEST(MediaQueryListTest, CrashInStop) 24 TEST(MediaQueryListTest, CrashInStop)
25 { 25 {
26 RawPtr<Document> document = Document::create(); 26 Document* document = Document::create();
27 RawPtr<MediaQueryList> list = MediaQueryList::create(document.get(), MediaQu eryMatcher::create(*document), MediaQuerySet::create()); 27 MediaQueryList* list = MediaQueryList::create(document, MediaQueryMatcher::c reate(*document), MediaQuerySet::create());
28 list->addListener(new TestListener()); 28 list->addListener(new TestListener());
29 list->stop(); 29 list->stop();
30 // This test passes if it's not crashed. 30 // This test passes if it's not crashed.
31 } 31 }
32 32
33 } // namespace blink 33 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/css/MediaQueryListEvent.h ('k') | third_party/WebKit/Source/core/css/MediaQueryMatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698