Lines Matching full:bindings
20 // Javascript bindings for ProxyResolverV8, which returns mock values.
21 // Each time one of the bindings is called into, we push the input into a
85 // This is the same as ProxyResolverV8, but it uses mock bindings in place of
86 // the default bindings, and has a helper function to load PAC scripts from
243 MockJSBindings* bindings = resolver.mock_js_bindings(); in TEST() local
244 EXPECT_EQ(0U, bindings->alerts.size()); in TEST()
245 ASSERT_EQ(1U, bindings->errors.size()); in TEST()
247 bindings->errors[0]); in TEST()
272 MockJSBindings* bindings = resolver.mock_js_bindings(); in TEST() local
273 EXPECT_EQ(0U, bindings->alerts.size()); in TEST()
276 ASSERT_EQ(1U, bindings->errors.size()); in TEST()
279 bindings->errors[0]); in TEST()
322 MockJSBindings* bindings = resolver.mock_js_bindings(); in TEST() local
323 EXPECT_EQ(0U, bindings->alerts.size()); in TEST()
324 ASSERT_EQ(1U, bindings->errors.size()); in TEST()
326 bindings->errors[0]); in TEST()
398 MockJSBindings* bindings = resolver.mock_js_bindings(); in TEST() local
399 bindings->dns_resolve_result = "127.0.0.1"; in TEST()
413 ASSERT_EQ(5U, bindings->alerts.size()); in TEST()
414 EXPECT_EQ("undefined", bindings->alerts[0]); in TEST()
415 EXPECT_EQ("null", bindings->alerts[1]); in TEST()
416 EXPECT_EQ("undefined", bindings->alerts[2]); in TEST()
417 EXPECT_EQ("[object Object]", bindings->alerts[3]); in TEST()
418 EXPECT_EQ("exception from calling toString()", bindings->alerts[4]); in TEST()
422 ASSERT_EQ(2U, bindings->dns_resolves.size()); in TEST()
423 EXPECT_EQ("", bindings->dns_resolves[0]); in TEST()
424 EXPECT_EQ("arg1", bindings->dns_resolves[1]); in TEST()
427 EXPECT_EQ(2, bindings->my_ip_address_count); in TEST()
430 EXPECT_EQ(1, bindings->my_ip_address_ex_count); in TEST()
433 ASSERT_EQ(2U, bindings->dns_resolves_ex.size()); in TEST()
434 EXPECT_EQ("is_resolvable", bindings->dns_resolves_ex[0]); in TEST()
435 EXPECT_EQ("foobar", bindings->dns_resolves_ex[1]); in TEST()
446 MockJSBindings* bindings = resolver.mock_js_bindings(); in TEST() local
449 EXPECT_EQ(1, bindings->my_ip_address_count); in TEST()
459 // Check that no other bindings were called. in TEST()
460 EXPECT_EQ(0U, bindings->errors.size()); in TEST()
461 ASSERT_EQ(0U, bindings->alerts.size()); in TEST()
462 ASSERT_EQ(0U, bindings->dns_resolves.size()); in TEST()
463 EXPECT_EQ(0, bindings->my_ip_address_ex_count); in TEST()
464 ASSERT_EQ(0U, bindings->dns_resolves_ex.size()); in TEST()
537 // before passing it onto the bindings layer. in TEST()
538 MockJSBindings* bindings = resolver.mock_js_bindings(); in TEST() local
540 ASSERT_EQ(1u, bindings->dns_resolves.size()); in TEST()
541 EXPECT_EQ("xn--bcher-kva.ch", bindings->dns_resolves[0]); in TEST()
543 ASSERT_EQ(1u, bindings->dns_resolves_ex.size()); in TEST()
544 EXPECT_EQ("xn--bcher-kva.ch", bindings->dns_resolves_ex[0]); in TEST()