OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2010 Google Inc. All rights reserved. | 2 * Copyright (C) 2010 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 8426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8437 public: | 8437 public: |
8438 CallbackOrderingWebFrameClient() : m_callbackCount(0) { } | 8438 CallbackOrderingWebFrameClient() : m_callbackCount(0) { } |
8439 | 8439 |
8440 void didStartLoading(bool toDifferentDocument) override | 8440 void didStartLoading(bool toDifferentDocument) override |
8441 { | 8441 { |
8442 EXPECT_EQ(0, m_callbackCount++); | 8442 EXPECT_EQ(0, m_callbackCount++); |
8443 FrameTestHelpers::TestWebFrameClient::didStartLoading(toDifferentDocumen
t); | 8443 FrameTestHelpers::TestWebFrameClient::didStartLoading(toDifferentDocumen
t); |
8444 } | 8444 } |
8445 void didStartProvisionalLoad(WebLocalFrame*, double) override { EXPECT_EQ(1,
m_callbackCount++); } | 8445 void didStartProvisionalLoad(WebLocalFrame*, double) override { EXPECT_EQ(1,
m_callbackCount++); } |
8446 void didCommitProvisionalLoad(WebLocalFrame*, const WebHistoryItem&, WebHist
oryCommitType) override { EXPECT_EQ(2, m_callbackCount++); } | 8446 void didCommitProvisionalLoad(WebLocalFrame*, const WebHistoryItem&, WebHist
oryCommitType) override { EXPECT_EQ(2, m_callbackCount++); } |
8447 void didFinishDocumentLoad(WebLocalFrame*, bool documentIsEmpty) override {
EXPECT_EQ(3, m_callbackCount++); } | 8447 void didFinishDocumentLoad(WebLocalFrame*) override { EXPECT_EQ(3, m_callbac
kCount++); } |
8448 void didHandleOnloadEvents(WebLocalFrame*) override { EXPECT_EQ(4, m_callbac
kCount++); } | 8448 void didHandleOnloadEvents(WebLocalFrame*) override { EXPECT_EQ(4, m_callbac
kCount++); } |
8449 void didFinishLoad(WebLocalFrame*) override { EXPECT_EQ(5, m_callbackCount++
); } | 8449 void didFinishLoad(WebLocalFrame*) override { EXPECT_EQ(5, m_callbackCount++
); } |
8450 void didStopLoading() override | 8450 void didStopLoading() override |
8451 { | 8451 { |
8452 EXPECT_EQ(6, m_callbackCount++); | 8452 EXPECT_EQ(6, m_callbackCount++); |
8453 FrameTestHelpers::TestWebFrameClient::didStopLoading(); | 8453 FrameTestHelpers::TestWebFrameClient::didStopLoading(); |
8454 } | 8454 } |
8455 | 8455 |
8456 private: | 8456 private: |
8457 int m_callbackCount; | 8457 int m_callbackCount; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
8528 } | 8528 } |
8529 | 8529 |
8530 TEST_F(WebFrameVisibilityChangeTest, RemoteFrameParentVisibilityChange) | 8530 TEST_F(WebFrameVisibilityChangeTest, RemoteFrameParentVisibilityChange) |
8531 { | 8531 { |
8532 swapLocalFrameToRemoteFrame(); | 8532 swapLocalFrameToRemoteFrame(); |
8533 executeScriptOnMainFrame(WebScriptSource("document.querySelector('iframe').p
arentElement.style.display = 'none';")); | 8533 executeScriptOnMainFrame(WebScriptSource("document.querySelector('iframe').p
arentElement.style.display = 'none';")); |
8534 EXPECT_FALSE(remoteFrameClient()->isVisible()); | 8534 EXPECT_FALSE(remoteFrameClient()->isVisible()); |
8535 } | 8535 } |
8536 | 8536 |
8537 } // namespace blink | 8537 } // namespace blink |
OLD | NEW |