Lines Matching full:navigation_state
18 FrameNavigationState navigation_state;
26 EXPECT_FALSE(navigation_state.CanSendEvents(frame_id1));
27 EXPECT_FALSE(navigation_state.IsValidFrame(frame_id1));
28 navigation_state.TrackFrame(frame_id1, frame_id0, url1, true, false, false);
29 navigation_state.SetNavigationCommitted(frame_id1);
30 EXPECT_TRUE(navigation_state.CanSendEvents(frame_id1));
31 EXPECT_TRUE(navigation_state.IsValidFrame(frame_id1));
34 EXPECT_FALSE(navigation_state.CanSendEvents(frame_id2));
35 EXPECT_FALSE(navigation_state.IsValidFrame(frame_id2));
36 navigation_state.TrackFrame(frame_id2, frame_id1, url2, false, false, false);
37 navigation_state.SetNavigationCommitted(frame_id2);
38 EXPECT_TRUE(navigation_state.CanSendEvents(frame_id2));
39 EXPECT_TRUE(navigation_state.IsValidFrame(frame_id2));
42 EXPECT_TRUE(navigation_state.IsMainFrame(frame_id1));
43 EXPECT_EQ(url1, navigation_state.GetUrl(frame_id1));
44 EXPECT_FALSE(navigation_state.IsMainFrame(frame_id2));
45 EXPECT_EQ(url2, navigation_state.GetUrl(frame_id2));
46 EXPECT_EQ(frame_id1, navigation_state.GetMainFrameID());
49 navigation_state.StopTrackingFramesInRVH(fake_rvh,
51 EXPECT_FALSE(navigation_state.CanSendEvents(frame_id1));
52 EXPECT_FALSE(navigation_state.IsValidFrame(frame_id1));
53 EXPECT_FALSE(navigation_state.CanSendEvents(frame_id2));
54 EXPECT_FALSE(navigation_state.IsValidFrame(frame_id2));
60 FrameNavigationState navigation_state;
65 navigation_state.TrackFrame(frame_id1, frame_id0, url, true, false, false);
66 EXPECT_TRUE(navigation_state.CanSendEvents(frame_id1));
67 EXPECT_FALSE(navigation_state.GetErrorOccurredInFrame(frame_id1));
70 navigation_state.SetErrorOccurredInFrame(frame_id1);
71 EXPECT_FALSE(navigation_state.CanSendEvents(frame_id1));
72 EXPECT_TRUE(navigation_state.GetErrorOccurredInFrame(frame_id1));
75 navigation_state.TrackFrame(frame_id1, frame_id0, GURL(), true, true, false);
76 EXPECT_FALSE(navigation_state.CanSendEvents(frame_id1));
77 EXPECT_TRUE(navigation_state.GetErrorOccurredInFrame(frame_id1));
80 navigation_state.TrackFrame(frame_id1, frame_id0, url, true, false, false);
81 EXPECT_TRUE(navigation_state.CanSendEvents(frame_id1));
82 EXPECT_FALSE(navigation_state.GetErrorOccurredInFrame(frame_id1));
88 FrameNavigationState navigation_state;
94 navigation_state.TrackFrame(frame_id1, frame_id0, url, true, false, false);
95 navigation_state.TrackFrame(frame_id2, frame_id1, url, false, false, false);
96 EXPECT_TRUE(navigation_state.CanSendEvents(frame_id1));
97 EXPECT_TRUE(navigation_state.CanSendEvents(frame_id2));
100 navigation_state.SetErrorOccurredInFrame(frame_id2);
101 EXPECT_TRUE(navigation_state.CanSendEvents(frame_id1));
102 EXPECT_FALSE(navigation_state.CanSendEvents(frame_id2));
105 navigation_state.TrackFrame(frame_id2, frame_id1, GURL(), false, true, false);
106 EXPECT_TRUE(navigation_state.CanSendEvents(frame_id1));
107 EXPECT_FALSE(navigation_state.CanSendEvents(frame_id2));
110 navigation_state.TrackFrame(frame_id2, frame_id1, url, false, false, false);
111 EXPECT_TRUE(navigation_state.CanSendEvents(frame_id1));
112 EXPECT_TRUE(navigation_state.CanSendEvents(frame_id2));
117 FrameNavigationState navigation_state;
122 navigation_state.TrackFrame(frame_id1, frame_id0, url, true, false, false);
123 EXPECT_FALSE(navigation_state.CanSendEvents(frame_id1));
128 FrameNavigationState navigation_state;
134 navigation_state.TrackFrame(frame_id1, frame_id0, url, true, false, false);
135 navigation_state.TrackFrame(frame_id2, frame_id1, url, false, false, false);
136 EXPECT_TRUE(navigation_state.CanSendEvents(frame_id1));
137 EXPECT_TRUE(navigation_state.CanSendEvents(frame_id2));
139 EXPECT_TRUE(navigation_state.GetParentFrameID(frame_id1) == frame_id0);
140 EXPECT_TRUE(navigation_state.GetParentFrameID(frame_id2) == frame_id1);
145 FrameNavigationState navigation_state;
153 navigation_state.TrackFrame(frame_id1, frame_id0, url, true, false, false);
154 navigation_state.TrackFrame(frame_id2, frame_id1, blank, false, false, true);
155 EXPECT_TRUE(navigation_state.CanSendEvents(frame_id1));
156 EXPECT_TRUE(navigation_state.CanSendEvents(frame_id2));
158 EXPECT_TRUE(navigation_state.GetUrl(frame_id1) == url);
159 EXPECT_TRUE(navigation_state.GetUrl(frame_id2) == srcdoc);
161 EXPECT_TRUE(navigation_state.IsValidUrl(srcdoc));
166 FrameNavigationState navigation_state;
174 EXPECT_FALSE(navigation_state.CanSendEvents(frame_id1));
175 EXPECT_FALSE(navigation_state.IsValidFrame(frame_id1));
176 navigation_state.TrackFrame(frame_id1, frame_id0, url1, true, false, false);
177 navigation_state.SetNavigationCommitted(frame_id1);
178 EXPECT_TRUE(navigation_state.CanSendEvents(frame_id1));
179 EXPECT_TRUE(navigation_state.IsValidFrame(frame_id1));
182 EXPECT_FALSE(navigation_state.CanSendEvents(frame_id2));
183 EXPECT_FALSE(navigation_state.IsValidFrame(frame_id2));
184 navigation_state.TrackFrame(frame_id2, frame_id1, url2, false, false, false);
185 navigation_state.SetNavigationCommitted(frame_id2);
186 EXPECT_TRUE(navigation_state.CanSendEvents(frame_id2));
187 EXPECT_TRUE(navigation_state.IsValidFrame(frame_id2));
190 EXPECT_TRUE(navigation_state.IsMainFrame(frame_id1));
191 EXPECT_EQ(url1, navigation_state.GetUrl(frame_id1));
192 EXPECT_FALSE(navigation_state.IsMainFrame(frame_id2));
193 EXPECT_EQ(url2, navigation_state.GetUrl(frame_id2));
194 EXPECT_EQ(frame_id1, navigation_state.GetMainFrameID());
197 navigation_state.FrameDetached(frame_id2);
198 EXPECT_TRUE(navigation_state.IsMainFrame(frame_id1));
199 EXPECT_EQ(url1, navigation_state.GetUrl(frame_id1));
200 EXPECT_EQ(frame_id1, navigation_state.GetMainFrameID());
201 EXPECT_FALSE(navigation_state.CanSendEvents(frame_id2));
202 EXPECT_FALSE(navigation_state.IsValidFrame(frame_id2));