Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 13 for topPrivateDomain (0.08 seconds)

The search processing time has exceeded the limit. The displayed results may be partial.

  1. okhttp/src/jvmTest/kotlin/okhttp3/HttpUrlJvmTest.kt

          .isEqualTo("xn--ewv.xn--4pvxs.jp")
        assertThat("https://co.uk".toHttpUrl().topPrivateDomain()).isNull()
        assertThat("https://square".toHttpUrl().topPrivateDomain()).isNull()
        assertThat("https://栃木.jp".toHttpUrl().topPrivateDomain()).isNull()
        assertThat("https://xn--4pvxs.jp".toHttpUrl().topPrivateDomain()).isNull()
        assertThat("https://localhost".toHttpUrl().topPrivateDomain()).isNull()
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Mar 19 19:25:20 GMT 2025
    - 12K bytes
    - Click Count (0)
  2. android-test-app/src/androidTest/kotlin/okhttp/android/testapp/PublicSuffixDatabaseTest.kt

     */
    class PublicSuffixDatabaseTest {
      @Test
      fun testTopLevelDomain() {
        assertThat("https://www.google.com/robots.txt".toHttpUrl().topPrivateDomain()).isEqualTo("google.com")
      }
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 1K bytes
    - Click Count (0)
  3. guava-tests/test/com/google/common/net/InternetDomainNameTest.java

        InternetDomainName googleDomain = InternetDomainName.from("google.com");
    
        assertThat(googleDomain.topPrivateDomain()).isEqualTo(googleDomain);
        assertThat(googleDomain.child("mail").topPrivateDomain()).isEqualTo(googleDomain);
        assertThat(googleDomain.child("foo.bar").topPrivateDomain()).isEqualTo(googleDomain);
      }
    
      public void testInvalidTopPrivateDomain() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 15:59:55 GMT 2026
    - 17.8K bytes
    - Click Count (0)
  4. android/guava-tests/test/com/google/common/net/InternetDomainNameTest.java

        InternetDomainName googleDomain = InternetDomainName.from("google.com");
    
        assertThat(googleDomain.topPrivateDomain()).isEqualTo(googleDomain);
        assertThat(googleDomain.child("mail").topPrivateDomain()).isEqualTo(googleDomain);
        assertThat(googleDomain.child("foo.bar").topPrivateDomain()).isEqualTo(googleDomain);
      }
    
      public void testInvalidTopPrivateDomain() {
    Created: Fri Apr 03 12:43:13 GMT 2026
    - Last Modified: Mon Mar 16 15:59:55 GMT 2026
    - 17.8K bytes
    - Click Count (0)
  5. okhttp/src/commonJvmAndroid/kotlin/okhttp3/HttpUrl.kt

       *
       * In general this method **should not** be used to test whether a domain is valid or routable.
       * Instead, DNS is the recommended source for that information.
       *
       * | URL                           | `topPrivateDomain()` |
       * | :---------------------------- | :------------------- |
       * | `http://google.com`           | `"google.com"`       |
       * | `http://adwords.google.co.uk` | `"google.co.uk"`     |
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jan 27 09:00:39 GMT 2026
    - 63.5K bytes
    - Click Count (0)
  6. android-test/src/test/kotlin/okhttp/android/test/BaseOkHttpClientUnitTest.kt

          assertThat(response.cacheResponse).isNotNull()
        }
      }
    
      @Test
      open fun testPublicSuffixDb() {
        val httpUrl = "https://www.google.co.uk".toHttpUrl()
        assertThat(httpUrl.topPrivateDomain()).isEqualTo("google.co.uk")
      }
    
      private fun assumeNetwork() {
        try {
          InetAddress.getByName("www.google.com")
        } catch (uhe: UnknownHostException) {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Jul 22 20:03:31 GMT 2025
    - 2.3K bytes
    - Click Count (0)
  7. native-image-tests/src/test/kotlin/okhttp3/nativeimage/PublicSuffixDatabaseTest.kt

    import org.junit.jupiter.api.Test
    
    class PublicSuffixDatabaseTest {
      @Test
      fun testResourcesLoaded() {
        val url = "https://api.twitter.com".toHttpUrl()
    
        assertThat(url.topPrivateDomain()).isEqualTo("twitter.com")
      }
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Fri Jul 04 08:15:11 GMT 2025
    - 964 bytes
    - Click Count (0)
  8. android-test-app/src/main/kotlin/okhttp/android/testapp/MainActivity.kt

        val client = OkHttpClient()
    
        // Ensure we are compiling against the right variant
        println(AndroidPlatform.isSupported)
    
        val url = "https://github.com/square/okhttp".toHttpUrl()
        println(url.topPrivateDomain())
    
        client.newCall(Request(url)).enqueue(
          object : Callback {
            override fun onFailure(
              call: Call,
              e: IOException,
            ) {
              println("failed: $e")
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Aug 19 08:10:39 GMT 2025
    - 1.7K bytes
    - Click Count (0)
  9. android-test/src/test/kotlin/okhttp/android/test/DisabledInitialiserTest.kt

        Platform.resetForTests()
        PlatformRegistry.applicationContext = null
      }
    
      @Test
      fun testWithoutContext() {
        val httpUrl = "https://www.google.co.uk".toHttpUrl()
        assertFailure { httpUrl.topPrivateDomain() }.all {
          hasMessage("Unable to load PublicSuffixDatabase.list resource.")
          cause().isNotNull().all {
            hasMessage(
              "Platform applicationContext not initialized. " +
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Sat Aug 30 16:25:39 GMT 2025
    - 2.1K bytes
    - Click Count (0)
  10. docs/changelogs/changelog_4x.md

     *  Fix: Recover gracefully when a cache entry's certificate is corrupted.
    
     *  Fix: Fail permanently when there's a failure loading the bundled public suffix database.
        This is the dataset that powers `HttpUrl.topPrivateDomain()`.
    
     *  Fix: Immediately update the connection's flow control window instead of waiting for the
        receiving stream to process it.
    
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Wed Apr 17 13:25:31 GMT 2024
    - 25.2K bytes
    - Click Count (0)
Back to Top